美文网首页
虚拟机中最小安装centos7没有ifconfig命令

虚拟机中最小安装centos7没有ifconfig命令

作者: 深吸一口气 | 来源:发表于2021-08-27 09:22 被阅读0次

在虚拟机中最小安装centos7后使用ifconfig命令查询ip时提示ifconfig :command not fond`

[root@localhost ~]# ifconfig
-bash: ifconfig: command not found

这种情况可以使用ip addr查询ip
当然暂时是查不到ip的,需要先激活网卡

[root@localhost ~]# cd /etc/sysconfig/network-scripts

将对应网卡的ONBOOTno改为yes,然后重启网卡

[root@localhost ~]# service network restart

然后使用ip addr就可以查看到虚拟机ip了

相关文章

网友评论

      本文标题:虚拟机中最小安装centos7没有ifconfig命令

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