root@lihua1-X299-WU8:~# systemctl stop NetworkManager
root@lihua1-X299-WU8:~# systemctl disable NetworkManager
Removed /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
Removed /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
root@lihua1-X299-WU8:~# service network-manager restart
root@lihua1-X299-WU8:~# ping www.baidu.com
ping: unknown host
root@lihua1-X299-WU8:~# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: icmp_seq=0 ttl=63 time=1.043 ms
64 bytes from 192.168.0.1: icmp_seq=1 ttl=63 time=0.946 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=63 time=0.817 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=63 time=0.811 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=63 time=0.876 ms
root@lihua1-X299-WU8:~# vim /etc/resolv.conf
#nameserver 127.0.0.53
#options edns0
#添加以下内容
nameserver 221.228.255.1
nameserver 114.114.114.114
root@lihua1-X299-WU8:~# ping www.baidu.com
PING www.a.shifen.com (14.215.177.39): 56 data bytes
64 bytes from 14.215.177.39: icmp_seq=0 ttl=55 time=9.244 ms