0

我需要找到给定 Linux 可执行文件的完整路径吗?我怎样才能做到这一点?

例如 cat 的真实路径是 /bin/cat

4

3 回答 3

3

使用whichlocate

$ which cat
/bin/cat
于 2013-09-07T15:26:59.050 回答
2

您可以使用 which 命令:

$ which ifconfig
/sbin/ifconfig
于 2013-09-07T15:27:20.913 回答
1

which program或者whereis program

$  whatis which
which                (1)  - shows the full path of (shell) commands

$  whatis whereis
whereis              (1)  - locate the binary, source, and manual page files for a command
于 2013-09-07T15:27:17.643 回答