# cd /etc/network/ # vi interfaces (以下为文件内容) # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface auto lo iface lo inet loopback
# vi /etc/resolv.conf (以下为文件内容) # Generated by NetworkManager # search localdomain # nameserver 192.168.23.2 nameserver 114.114.114.114 nameserver 8.8.8.8
修改相应的nameserver内容即可。
若不通,则可继续修改如下文件:
# vi /etc/nsswitch.conf (以下为相关内容) # /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc-reference' and `info' packages installed, try: # `info libc "Name Service Switch"' for information about this file.