为什么“ifconfig”在我的某些机器上不起作用?

Ale*_*lex 4 linux unix

有些确实……有些不起作用。

ifconfig
-bash: ifconfig: command not found
Run Code Online (Sandbox Code Playgroud)

小智 12

我认为这是当 ifconfig 位于 /usr/sbin 中时,它不在非管理员用户的路径中。尝试:

/sbin/ifconfig
Run Code Online (Sandbox Code Playgroud)

  • 您还可以修改 PATH 变量以包含 /sbin 目录。 (6认同)