我需要找到给定Linux可执行文件的完整路径吗? 我怎么能这样做?
例如,cat的真实路径是/ bin / cat
答案 0 :(得分:3)
使用which
或locate
:
$ which cat
/bin/cat
答案 1 :(得分:2)
您可以使用which命令:
$ which ifconfig
/sbin/ifconfig
答案 2 :(得分: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