虚拟机中不能上外网
虚拟机中不能上外网,报错如下:
curl: (6) Could not resolve host: www.baidu.com;
一般是DNS配置得不对。因此修改一下DNS
[root@localhost ~]# vim /etc/resolv.conf // 原先的DNS # Generated by NetworkManager nameserver 8.8.8.8 // 修改后的DNS # Generated by NetworkManager nameserver 114.114.114.114 nameserver 8.8.8.8 ---------------------