【转】linux root用户ifconfig报command not found

解决办法:

方法一:

直接输入su - 回车。就可以ifconfig了

方法二:

/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

保存。

在/etc/profile下面就是保存网络配置的,/etc里面是所有的系统配置文件。

当然,直接使用/sbin/ifconfig也可以进入。

上一篇:MongoDB 学习笔记(五):固定集合、GridFS文件系统与服务器端脚本


下一篇:TCP/IP详解 笔记八