Focus on cloud service provider activities
Notes on website operation and maintenance

Method record of configuring persistent DNS in Ubuntu system environment

Yesterday, when I helped a netizen to install Oneinstack script in the Linode machine, I was prompted that the official source program could not be downloaded. There is no problem with the server. PING and SSH login are normal. It seems that there is a problem with the DNS provided by the system. It needs to be replaced to solve the problem. Here Lao Zuo records the solution to DNS modification.

First, temporary solutions

vi /etc/resolv.conf

 Method record of configuring persistent DNS in Ubuntu system environment

If we temporarily solve the problem, we can directly change the nameserver to:

nameserver 8.8.8.8

nameserver 8.8.4.4

Then save and exit. However, if the server is restarted, it will be restored. It is not permanently modified. What we need to do is permanent modification.

Second, permanently modify DNS

In this article, this friend's system is the ubuntu system.

apt-get install resolvconf

Install resolvconf.

vi /etc/resolvconf/resolv.conf.d/base

Add:

nameserver 8.8.8.8
nameserver 8.8.4.4

Save and exit.

resolvconf -u

Restart DNS. Or we can restart the server. After it takes effect, we will try to download it again.

Vote for you
Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Method record of configuring persistent DNS in Ubuntu system environment