Is /etc/resolv.conf a symbolic link? If so, how can one make persistent changes to the DNS?
3 Answers
No no no. You don't manually edit /etc/resolv.conf.
To enter your own DNS addresses, go to the Network icon in the top panel, and select Edit Connections. Open the profile for the network where you'd like your own DNS servers defined.
Select the IPv4 tab. Set Automatic (DHCP) addresses only, and a comma-separated list of DNS servers into the DNS servers field.
- 73,937
-
3@thank you for the information but I cannot use any kind of graphic interface. I have to do everything from the command line since I can only connect through ssh to the virtual machine and it is built in a way in which there is no GUI on it. – yoyo_fun Dec 22 '16 at 08:26
-
1@yoyo_fun you should edit your question to include this very important information. – heynnema Dec 22 '16 at 15:16
With ls -l /etc/resolv.conf you can see (due to the arrow and the linked file), that it is indeed a symbolic link. For your problem see this solution.
-
I'm not a clickybuntu user :P so I prefer the solution in the provided link! – Julian Berger Dec 22 '16 at 13:55
-
Now that the OP has revealed that they're on a server with no GUI, your answer sounds good! – heynnema Dec 22 '16 at 15:18
I need to install the resolvconf package. It's a very strange case, maybe an install error or Ubuntu bug, but it happens in a fresh install.
Just do:
apt-get install resolvconf
Then:
service resolvconf restart
Or:
/etc/init.d/resolvconf restart
If you need to change de DNS, edit /etc/resolvconf/resolv.conf.d/base and add nameservers as:
nameserver x.x.x.x
nameserver y.y.y.y
Then restart resolvconf.
- 103