environment
Shell and environment configuration
-
crontab
Tested crontab examples: schedule syntax, @reboot/@daily shortcuts, per-user crontabs, and the PATH gotcha that breaks jobs that work fine in your shell.
-
env and printenv
Tested env and printenv examples: reading a variable, running one command with a changed environment, and what -S fixes on a shebang line.
-
which
Tested which examples: how PATH order decides the answer, the shell script Debian ships in place of the GNU program, and the deprecation that was reversed.
-
Environment variables and PATH
Why a program you can see and execute is still not found, how the environment is copied into each new process, and where PATH is really set on Debian.
-
Terminal, shell and tty
What a terminal, a tty, a shell and a console each actually are, why Ctrl-D is not a signal, and why Ctrl-S appears to freeze everything.
-
Add a directory to your PATH permanently
How to put a directory on PATH for good on Debian, why ~/.local/bin needs no configuration at all, and what to do for any other directory.
-
command not found
The shell says this for a command that is missing, one that is not on PATH, one it remembers in the wrong place, and a script whose interpreter is gone.
-
Works in the shell, fails in cron
cron hands a job five variables and a PATH of /usr/bin:/bin, runs it from your home directory under dash, and sends the failure somewhere you are not looking.
-
which vs type vs command -v
which searches PATH and nothing else, so it reports that cd does not exist. What type and command -v answer instead, and which one belongs in a script.