How do I see my current $PATH?
Run `echo $PATH` in the terminal. It prints all directories separated by colons. For a more readable format, run `echo $PATH | tr ":" "\n"` to list each directory on its own line.
Quick Answer
The `$PATH` environment variable is a colon-separated list of directories the shell searches when you type a command name without a full path. Duplicate entries waste lookup time on every command. Dead directories from uninstalled software slow startup. Missing entries cause exit code 127 even when the binary exists elsewhere on disk. Order matters: the shell uses the first match, so an older `python` in `/usr/bin` wins over a newer one in `/usr/local/bin` if it appears first. This debugger splits your pasted PATH into one directory per line, flags duplicates plus empty and relative entries, writes a shell one-liner that checks every directory on disk, and outputs a deduplicated string you can paste into `~/.bashrc` or `~/.zshrc`. Run `echo $PATH`, paste the result, and review before editing your shell profile. No data leaves your browser. Use it when command-not-found errors appear after installing software, when CI builds behave differently from your laptop, or when cleaning up a PATH bloated by years of manual exports across profile files.
How do I see my current $PATH?
Run `echo $PATH` in the terminal. It prints all directories separated by colons. For a more readable format, run `echo $PATH | tr ":" "\n"` to list each directory on its own line.
Why does PATH order matter in bash?
When you run a command, the shell searches PATH directories left to right and uses the first binary it finds. If you have two versions of a tool installed in different directories, the one in the earlier PATH entry wins. This is why putting your local bin directories first is important.
How do I permanently add a directory to $PATH?
Add `export PATH="/your/dir:$PATH"` to ~/.bashrc (bash) or ~/.zshrc (zsh). Then run `source ~/.bashrc` to apply changes to the current session. New terminal sessions will pick it up automatically.
What causes "command not found" errors in bash?
The binary is either not installed, or its directory is missing from $PATH. Paste your PATH into this tool to check whether the expected directory is present. If the directory is there, verify the binary exists with `which commandname` or `ls /expected/path/`.
An operational script system + a 30-function shared library + a 52-page field guide. The production layer the free snippets don't cover.
Get the Toolkit →Ten functions I source into every script on my own boxes — strict-mode setup, an ERR trap that names the failing line, lock and timeout wrappers, and cleanup that runs on every exit path. One email, no sequence.
intermediate · error-handling
Bash Error Handling with set -euo pipefail
Bash keeps going after a failed command, so a broken cd followed by rm -rf hits the wrong directory. set -euo pipefail stops the script at the first failure.
beginner · conditionals
Bash If/Else Examples
The wrong comparison operator makes a bash if statement fail silently on unexpected input. if/else, elif, integer and string tests, file checks, and quoting.
beginner · path
Fix "bash: command not found": PATH, Typos, hash -r, CRLF and Cron
Fix bash: command not found: check PATH, typos, a stale hash table, CRLF line endings and sudo's PATH. What exit code 127 means in scripts, cron and CI logs.
echo $PATH — then paste the output hereA web page cannot read your system or your disk. This tool checks the text you paste; the shell lines it generates check the directories for real.