在非root用户下,一般不可以执行ifconfig,我们通过以下两种方法,解决这个问题: 方法一: $cd /sbin $./ifconfig 或直接 $/sbin/ifconfig
方法二: 修改.bash_profile,centos下如下操作: $cd ~ $vi .bash_profile 添加:export PATH=$PATH:/sbin $:wq 然后就可以直接 $ifconfig
You must be logged in to post a comment.