请知悉:本文最近一次更新为 5年 前,文中内容可能已经过时。

程序其实是有的,只不过没有默认路径,所以可以通过如下方式直接使用:

/sbin/ifconfig

也可以

vi /etc/profile

将:

if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

其中的if注释掉,即:

#if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
#fi

之后重启系统或者

source /etc/profile

即可直接使用ifconfig。


如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。

尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。


与《RedHat 5 ifconfig: command not found解决方案》相关的博文:


4
留言

avatar
😀
😀😁😂😅😭🤭😋😘🤔😰😱🤪💪👍👎🤝🌹👌
熊猫哥哥
熊猫哥哥
【🚶访客】

哈哈哈,感谢大哥

熊猫哥哥
熊猫哥哥
【🚶访客】

噢,我没看仔细,我只注释了fi 前面 那个if 没注释 尴尬哈哈哈哈

熊猫哥哥
熊猫哥哥
【🚶访客】

注释掉#会报错啊 显示最后一行 语法错误 unexpected end of file