Lecture notes · The Missing Semester · Lecture 5

Command-line Environment

MIT 6.NULL The Missing Semester of Your CS Education, lecture 5, explained in plain English

Want this lecture to stick? In LessonBound you get checked practice questions for every part, can ask about anything you don't get, and can listen with your screen off. Free, no ads.

Learn this lecture free

Watch or read the original lecture: MIT OpenCourseWare.

Part 1

This part shows how to stop, pause, and background running programs, run several shell sessions at once, and save time with shortcuts called aliases.

Key ideas

Words to know

signal
A short message the system sends to a running program to get it to respond, for example to stop or pause.
SIGINT
The signal sent when you press Ctrl-C. It asks the running program to interrupt, and it usually stops the program.
nohup
A command wrapper that runs another program so it keeps going even after you close the terminal.
alias
A nickname you set up in the shell that stands in for a longer command, so typing the nickname runs the full command.

Example

Think of a shell job like a kitchen order. Ctrl-C is like shouting 'stop cooking!', and a cook can choose to ignore the shout if they have been told to keep going. An alias is like a short code on the order slip that the kitchen expands into the full recipe.

3 checked practice questions for this part are in the app.

Part 2

This part covers shortcuts and settings that make the command line faster and more personal, and how to use remote servers safely over SSH.

Key ideas

Words to know

alias
A short name you create for a longer command, so you type less.
dotfile
A hidden settings file whose name starts with a dot, used to set up a program the way you like it.
symlink
A shortcut that points from one place in the file system to a file stored somewhere else.
port forwarding
Sending traffic from a port on your own machine to a port on a remote machine, so you can reach a service that is not directly open to you.

Example

Think of an alias like a speed-dial button on a phone: one press calls a long number you would otherwise have to type every time. Dotfiles are like the saved settings on a phone that you copy to a new phone so it feels the same. Port forwarding is like a mail forwarding service that delivers letters sent to your address to a friend's house across town.

3 checked practice questions for this part are in the app.

Part 3

This part covers how to protect your remote connections, pick a better shell, and customize your tools so the command line works the way you want.

Key ideas

Words to know

dotfile
A settings file whose name starts with a dot, such as one that customizes your shell or editor. Keeping them in one place makes it easy to set up a new computer the same way.
globbing
Using wildcard symbols like * to match many file names at once. Zsh has smarter globbing, including the ** pattern.
mosh
A remote login tool, like SSH, that stays connected through sleep, network changes, and lag.
alias
A short nickname you create for a longer command, so you can type less. The lesson suggests making an alias called dc that works as cd.

Example

Think of your dotfiles like a saved set of seat and mirror settings for your car. When you get into a new car, you can load your saved settings in one step instead of adjusting everything by hand. A setup script does the same job for your computer.

3 checked practice questions for this part are in the app.

← Lecture 4: Data Wrangling · Lecture 6: Version Control (Git) →

Notes written by AI (Claude) from the lecture's official transcript, so check anything important against the lecture. MIT CSAIL · CC BY-NC-SA 4.0 · not affiliated with or endorsed by MIT. These notes are shared under the same license.

LessonBound · Free lecture notes · Privacy · Terms · New York