
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!

read the transcript!
editing text ([almost] always works)
backspace
Ctrl + W
: delete previous wordCtrl + U
: delete line
(except in text editors)
quitting
Ctrl + C
: quit (SIGINT
)Ctrl + Z
: stop process (SIGTSTP
) (resume withfg
orbg
or kill (withkill
)Ctrl + D
: quit (in a REPL) (more on page 20)q
: quit (in some full screen programs)Enter
: exit frozen SSH session
or the nuclear option:
$ ps aux | grep THING
bork 7213 ... THING
$ kill -9 7213
editing text
(these often work in a readline-like situation)
-
arrow keys
-
Ctrl + A
orHome
: beginning of line -
Ctrl + E
orEnd
: end of line -
Ctrl + arrow keys
: left/right a word
or sometimesAlt + arrow keys
orOption + arrow keys
orAlt+b / Alt+f
-
Ctrl + K
: delete line forward -
Ctrl + Y
: paste (fromCtrl+K
orCtrl+U
) -
Ctrl + H
: might work ifBackspace
doesn’t
also many shells have a “vi mode” if that’s your jam
other useful stuff
- Ctrl + L: clear screen
- Ctrl + R: search history
- Ctrl + Q: unfreeze screen (that you froze with
Ctrl+S
, more on page 25)
copy and paste
in your terminal emulator, it’s usually:
Ctrl + Shift + C/V
or Cmd + C/V
mouse stuff that might work
Option + click
- or
Alt + click
: place cursor scroll wheel
: scroll
Saturday Morning Comics!
Want another comic like this in your email every Saturday? Sign up here!