美文网首页
LINUX----ifconfig----command not

LINUX----ifconfig----command not

作者: JuMinggniMuJ | 来源:发表于2020-06-20 11:30 被阅读0次

测试环境:centos7

在安装完虚拟机之后,运行命令ifconfig提示command not found,这是因为一个新的虚拟机没有安装net-tools。然而安装net-tools却仍然报错,解决办法:

1.编辑网卡文件:
cd /etc/sysconfig/network-scripts/
vi ifcfg-enp0s3        #把ONBOOT=no,改为yes,并保存
2.重启网络:
service network restart
3.安装net-tools:
yum install net-tools
4.运行ifconfig:
命令截图
5.至此问题解决!

相关文章

网友评论

      本文标题:LINUX----ifconfig----command not

      本文链接:https://www.haomeiwen.com/subject/nvuwxktx.html