1

I changed nameserver in /etc/resolv.conf and after a system reboot it resets the nameserver back to what it was.

I am using linux mint 19 (Cinnamon).

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 8.8.8.8
nameserver 8.8.4.4

This is my file before i reboot my system and after reboot the nameserver changes.

  • /etc/resolv.conf maybe generated from other files. Which distro and version are you using? – muru Jul 20 '18 at 7:41
  • Please add the contents of your /etc/resolv.conf to your question. (Format it as code by selecting it and choosing the {} button from the editing menu.) Obfuscate if you must must make sure you tell us what you've redacted. – roaima Jul 20 '18 at 7:42
  • i am using linux mint 19 cinnamon – bishal Jul 20 '18 at 7:43
  • Please paste text not images of text. – roaima Jul 20 '18 at 7:50
  • You should be able to make it permanent via NetworkManager applet on Cinnamon (sorry I don't use it so have no idea), or your System settings in Mint. Alternatively do it via editing files, as per wiki.debian.org/NetworkConfiguration with addition of "dns-addresses 8.8.8.8 8.8.4.4" (or your preferred addresses to /etc/network/interfaces – guiverc Jul 20 '18 at 7:51
1

in Ubuntu 18 and I suppose in Mint 19 too, there is this new shit called "netplan".

Under /etc/netplan/ you 'll find a .yaml file that looks like this.

    # Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
  nameservers:
    addresses: [8.8.8.8]

Ente your DNS IP there and after closing it, make it permanent with sudo netplan apply

Alternatively you just change it in your settings (network manager GUI)

| improve this answer | |
0

I think your question is answered here

The link says that you "shouldn't manually update your resolv.conf, because all changes will be overwritten by data that your local DHCP server provides."

| improve this answer | |
0

You should be able to make it permanent via NetworkManager applet on Cinnamon (sorry I don't use it so have no idea), or your System Settings in Mint.

Alternatively do it via editing files, as per https://wiki.debian.org/NetworkConfiguration with the addition of

"dns-addresses 8.8.8.8 8.8.4.4"

(for google DNS; change to your preferred DNS addresses) in

/etc/network/interfaces
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.