Skip to Content
Navigation:

A stick figure smiling

This is a page from an upcoming zine called "The Secret Rules of the Terminal".

To get an email when the zine comes out, sign up for the zine announcements list!

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

Terminal programs have a lot of hidden rules and conventions (like some programs don’t quit when you press Ctrl+C!), and knowing them makes your life WAY easier.

Here are some of the questions I ask myself when starting a program!

  • is it a REPL? (Ctrl+D probably quits) (I can probably use basic readline shortcuts) -> is it using canonical mode? (arrow keys don’t work when entering text, try rlwrap)

  • am I actually in another program it started? (A pager like less or a text editor like vim)

  • is it noninteractive? (quit with Ctrl+C) -> is it stuck because it’s waiting for input on stdin and I forgot to pipe to it?

  • is it a shell? -> is this a minimal shell like dash? (if so, can I use bash instead?)

  • is it full screen? (q might quit) -> mouse reporting: is it on? -> (selecting text doesn’t work, but you might be able to click to navigate)

  • am I in some kind of special environment? -> (a server? tmux/screen? a container? a virtualenv? what environment variables are set?)

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)