执行ifconfig命令出现bash: ifconfig: command not found的解决

作者: tioced 2014-03-28 10:26:55
在Fedora的命令行下执行ifconfig命令,结果出现bash: ifconfig: command not found的错误提示,按以下方法就可以解决此问题。

解决办法:

1. # /sbin/ifconfig

[ximi@ximi_fedora ~]$ /sbin/ifconfig

或者

[ximi@ximi_fedora ~]$ su

口令:

[root@ximi_fedora ximi]# /sbin/ifconfig

2. 修改 /etc/profile 文件

[root@ximi_fedora ximi]# gedit /etc/profile

把下面if 语句注释掉

# Path manipulation

if [ "$EUID" = "0" ]; then

pathmunge /sbin

pathmunge /usr/sbin

pathmunge /usr/local/sbin

fi

修改为:

# Path manipulation

#if [ "$EUID" = "0" ]; then

pathmunge /sbin

pathmunge /usr/sbin

pathmunge /usr/local/sbin

#fi

保存,重新启动即可。

相关资讯