CentOS-7.5 解决ifconfig报错

1、报错信息:-bash: ifconfig: command not found

 

2、检查IP地址是否设置正常

ip addr

以上说明ip设置正常,如果没有获取到IP地址则设置一个即可,设置ip参考https://www.cnblogs.com/yybrhr/p/9809707.html 的3.1小节

3、检查sbin目录下是否存在ifconfig

cd /sbin
ls ifconfig

4、安装net-tool插件

原因:net-tool插件中带有ifconfig命令

yum install -y net-tools

5、检查命令

猜你喜欢

转载自www.cnblogs.com/yybrhr/p/10381941.html