Bash Internal variables $PATH

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

The search path for finding binaries for commands. Common examples include /usr/bin and /usr/local/bin.

When a user or script attempts to run a command, the paths in $PATH are searched in order to find a matching file with execute permission.

The directories in $PATH are separated by a : character.

~> $ echo "$PATH"
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin

So, for example, given the above $PATH, if you type lss at the prompt, the shell will look for /usr/kerberos/bin/lss, then /usr/local/bin/lss, then /bin/lss, then /usr/bin/lss, in this order, before concluding that there is no such command.



Got any Bash Question?