在学Bash的时候接触到内部命令,外部命令的概念。
所谓内部命令就是shell内建的,外部命令使用$PATH来查找。
判断一个命令是内部命令还是外部命令使用 type
对于外部命令,我们往往需要知道他的位置在哪里
which
man手册:which - shows the full path of (shell) commands.
显示对应命令的完整路径
whereis
man手册:whereis - locate the binary, source, and manual page files for a command
显示二进制、源代码、man手册文件 的位置
whereis显示的信息先比较which要更加全面