Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, The Secret Rules of the Terminal! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript". get the zine!
read the transcript!

knowing what type of program you’re in really helps

stick person with curly hair, thinking: why doesn’t Ctrl+C quit?? Oh, I’m in a REPL, I should use CTRL+D instead.

1. REPLs

(sqlite, ipython, bash)

  • you can probably use basic readline shortcuts to edit text
  • Ctrl+D usually quits
  • REPL stands for Read code, Evaluate it, Print the output, Loop (repeat)

2. full screen programs

(top, ncdu)

  • q might quit
  • ? might open the help
  • gotcha: if mouse reporting is on, you can’t select text without pressing Shift

3. noninteractive programs

(grep, find)

  • Ctrl+C usually quits
  • gotcha: you can get “stuck” waiting for input on stdin if you forget to specify an input (like if you run cat by itself)

programs that play by their own rules

vim doesn’t act like any other program

usually I avoid these unless (like with vim) I’ve made a special effort to learn them.

CTRL+C doesn’t always quit

REPLs and full-screen programs often use CTRL+C to man “stop the current operation” instead of “quit the program”