Centos7 虚拟机没有 ip 的解决办法
VMware 安装完 Linux(Centos7)后,通过 Xshell 连接时需要 ip 地址
使用 ip addr 查询时,没有显示对应的 ip 地址
ip addr

解决办法:
1、修改网络配置文件
vi /etc/sysconfig/network-scripts/ifcfg-ens33
将 ONBOOT=no 修改为 yes

2、重启网络服务生效
sudo service network restart
3、再次查询 ip addr

Now is better than never

浙公网安备 33010602011771号