env
Use
env
env | grep '^PATH='
What It Does
env prints environment variables available to a process.
An environment variable is a name-value string passed from a parent process to a child process. Scripts, cron jobs, and systemd services may not receive the same environment as your interactive shell.
Practice
Look for PATH, HOME, and USER.
printf '%s\n' "$HOME"
printf '%s\n' "$USER"
printf '%s\n' "$PATH"
command -v python3
PATH is the list of directories the shell searches when you type a command name.
Expected Output
HOMEshould point at your home directory.USERshould match your handle.PATHshould be colon-separated.command -v python3should print the path to the Python executable.
Watch Out
Environment values can contain sensitive data on other systems. Do not paste them blindly.
Common Failures
- A command works in your shell but not in cron or systemd: use full paths or set the environment explicitly.
command not found: inspectPATHand confirm the command exists withcommand -v.- Variable appears empty: it may be a shell variable that was never exported.
Docs Pointers
- Run
man env. - Run
man bash, then search forEnvironmentandShell Variables. - Read Environment Variables.

Linux Foundations