在虚拟机中最小安装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
将对应网卡的ONBOOT由no改为yes,然后重启网卡
[root@localhost ~]# service network restart
然后使用ip addr就可以查看到虚拟机ip了