bash ifconfig:command not found 解决方法

在非root用户下,一般不可以执行ifconfig,我们通过以下两种方法,解决这个问题:
方法一:
$cd /sbin
$./ifconfig
或直接
$/sbin/ifconfig

方法二:
修改.bash_profile,centos下如下操作:
$cd ~
$vi .bash_profile
添加:export PATH=$PATH:/sbin
$:wq
然后就可以直接
$ifconfig

This entry was posted in linux, 网络. Bookmark the permalink.

Leave a Reply