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 in amber, highlights empty entries in red, 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.
Run this script on a real Linux server
Get $200 free credit — DigitalOcean
Get $200 Free →Affiliate link · we earn a commission
Need a domain for your next project?
Register with Namecheap — free WHOIS privacy included
Check Domain Prices →Affiliate link · we earn a commission
6 scripts + shared library + 52-page field guide. The production layer the free snippets don't cover.
Get the Toolkit →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/`.
intermediate · error-handling
Bash Error Handling with set -euo pipefail
Bash silently continues after failed commands by default — a broken cd followed by rm -rf destroys the wrong directory. set -euo pipefail exits on first failure before damage spreads.
beginner · conditionals
Bash If/Else Examples
Comparison operator mistakes in bash scripts cause silent logic failures on unexpected input. Covers if/else, elif, integer and string test operators, file condition checks, and quoting safety.
echo $PATH — then paste the output here"Load My PATH" only works when this page is opened locally in a terminal browser — it cannot read your actual system PATH from a web browser.