vim /etc/systemd/resolved.conf添加或修改DNS的地址
[Resolve]
DNS=8.8.8.8
DNS=10.80.36.6
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes
重启网络服务生效
systemctl restart systemd-resolved.service
输入以下4条命令
1. sudo lshw -numeric -class network
2. sudo ifconfig -a
3. sudo route -nv
4. sudo dhclient -v
然后ping一下看看能不能ping通
原创文章,作者:kirin,如若转载,请注明出处:https://blog.ytso.com/245115.html