Linux temporary or permanent DNS modification recently reinstalls the system for VPS. Because the service provider does not provide DHCP, You have to manually set the IP address and DNS Server. Sadly, when the system was reinstalled, it forgot to enter the DNS Server. Finally, after entering the system, various domain names could not be resolved. There are two ways to modify DNS in Linux: temporary modification and Permanent modification. 1. Temporarily modify the nic dns address sudo vim/etc/resolv. change the conf file to the following content: nameserver 8.8.8.8 # change it to your primary DNSnameserver 8.8.8.4.4 # change it to your backup DNSsearch localhost # your domain name I used Google's DNS resolution server here. After modification: if wq exits, the configuration will take effect in real time, but the configuration may be lost after the system is restarted. In fact, when editing this file, you should also be able to see the comment "Do not manually edit" in the file header. 2. permanently modify the nic dns sudo-icd/etc/resolvconf/resolv. conf. dvim base to add the following content: nameserver 8.8.8.8nameserver 8.8.4.4: wq save and exit, so that the settings will not be lost after restart. In fact, your cat head file will find the comments in the image's header, which is not hard to guess resolv. the conf file is based on/etc/resolvconf/resolv. conf. d directory.