修改网络配置
执行命令: vim /etc/network/interfaces
文件末尾添加如下内容:
auto eth0
iface eth0 inet static
address 192.168.133.66
netmask 255.255.255.0
gateway 192.168.133.2
其中,iface eth0 inet static 指配置eth0使用静态ip,
address 是你需要设置的ip地址,
gateway 的网关需要和VMWare的网关一致,通过 “编辑–>虚拟网络编辑器–>NET模式–>NAT设置”查看
关闭NetworkManager
systemctl stop NetworkManager
重启网络服务
systemctl restart networking
查看IP
执行命令:ifconfig eth0
注:如果IP没变,重新执行 systemctl restart net