Search Path for Commands

$PATH defines where the shell searches for commands. Separate entries with colons :. Entries are searched left to right.

When you invoke a command just by name, e.g. man instead of /usr/bin/man, then the executable file is searched in $PATH.

Examples

Current Directory
Lookup commands in the current directory first
1
export PATH=".:$PATH"
Multiple Directories
Lookup commands first in /usr/local/bin, then in the previously declared directories:
1
export PATH="/usr/local/bin:$PATH"
BashSupport Pro 是一个 支持 $PATH 的 Bash 集成开发工具 – 马上试用!
© 2020–2022 Joachim Ansorg
声明
隐私政策
许可条款