查看虚拟机里的Centos7的IP

登录操作系统 用户名root 密码 123456

输入ip查询命令 ip addr

查看虚拟机里的Centos7的IP ip addr

发现 ens33 没有 inet 这个属性,那么就没法通过IP地址连接虚拟机。


查看ens33网卡的配置: vi /etc/sysconfig/network-scripts/ifcfg-ens33   

查看虚拟机里的Centos7的IP ip addr

从配置中可以发现 CentOS 7 默认是不启动网卡的(ONBOOT=no)。


把这一项改为YES(ONBOOT=yes),

查看虚拟机里的Centos7的IP ip addr

按 Esc 退出  Shift : wq 回车


重启网络服务: sudo service network restart 

查看虚拟机里的Centos7的IP ip addr


再输入  ip addr 

查看虚拟机里的Centos7的IP ip addr

这里 inet属性显示了 虚拟机里的IP  192.168.1.107 



相关文章:

  • 2022-01-15
  • 2021-05-16
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2021-10-12
  • 2021-07-20
猜你喜欢
  • 2021-11-28
相关资源
相似解决方案