CentOS 7无法使用ifconfig命令

 

 

 

ifconfig命令报错

ifconfig: command not found

解决

1.不能ping通,说明网卡未启用

 

2.修改网络配置

cd /etc/sysconfig/network-scripts 

vi ifcfg-eth0 #文件名可能不一样

 

 

3.重启网卡

service network restart

 

此时ifconfig命令还不能用,证明没有安装ifconfig相关的工具

 

4.安装ifconfig命令

查看提供ifconfig命令的工具包

yum provides ifconfig

安装ifconfig

 yum install net-tools

 

 

发布了29 篇原创文章 · 获赞 8 · 访问量 7006

猜你喜欢

转载自blog.csdn.net/weixin_42032199/article/details/100123538