我已经在我的 Ubuntu 8.04 上安装了 Hping3,但是安装后当我想使用 Hping3 时出现此错误:
Command 'hping3' is available in '/usr/sbin/hping3'
The command could not be located because '/usr/sbin' is not included in
the PATH environment variable.
This is most likely caused by the lack of administrative privileges
associated with your user account.
当我尝试运行时,ifconfig
我也得到了这个:
Command 'ifconfig' is available in '/sbin/ifconfig'
The command could not be located because '/sbin' is not included in
the PATH environment variable.
This is most likely caused by the lack of administrative privileges
associated with your user account.
首先我需要运行sudo su
然后运行命令。这是正常的吗?还是我错过了什么?
当我跑步时,echo $PATH
我得到:
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/amirreza/simulator/ns-allinone-2.33/bin:/home/amirreza/simulator/ns-allinone-2.33/tcl8.4.18/unix:/home/amirreza/simulator/ns-allinone-2.33/tk8.4.18/unix:/home/amirreza/simulator/ns-allinone-2.33/ns-2.33/:/home/amirreza/simulator/ns-allinone-2.33/nam-1.14/
hping 通常需要以 root 身份运行(就像许多其他网络分析工具一样)。
也就是说,两者都
/sbin
应该/usr/sbin
在你的 $PATH 中。无法运行 ifconfig 绝对是不正常的,也是一个主要的烦恼。这是我的 $PATH 供您参考:您可以使用 显示
echo $PATH
和编辑它export
,如下所示:PS。我的根 $PATH 是
... 以防万一。