
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!
PATH is how your shell knows where to find programs
It’s a list of directories that your shell searches in order.
smiling stick figure: $ python3
shell, represented by a nautilus shell:
PATH=/bin:/home/bork/bin:/usr/bin
(directories are separated by colons)
shell:
/bin/python3
? nope, doesn’t exist/home/bork/bin/python3
? nope, doesn’t existusr/bin/python3
? there it is!!! run that!
how to add a program to your PATH
- find the directory the program is in
- update
PATH
in your config with that directory - restart your shell
for WAY TOO MUCH info about how to do this, see https://wzrd.page/path
…but which directory was the program installed in?
remember how you installed it:
little stick figure with curly hair, thinking: hmm, I used the Rust installer, where does that install things?
… or do a brute force search:
find / -name python3 | grep bin
(usually I put a 2>/dev/nu11
too)
PATH
ordering drama
little stick figure with curly hair, thinking: ugh, no, don’t run THAT python3
, run the other one!
You can prioritize a directory by adding it to the beginning of your PATH
gotcha: not everything uses your PATH
cron jobs usually have a very basic PATH
, maybe just /bin
and /usr/bin
In a cron job I’ll use the absolute path
/home/bork/bin/someprogram
Saturday Morning Comics!
Want another comic like this in your email every Saturday? Sign up here!