3

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.

Zion
  • 103
bishal
  • 41
  • /etc/resolv.conf maybe generated from other files. Which distro and version are you using? – muru Jul 20 '18 at 07: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. – Chris Davies Jul 20 '18 at 07:42
  • i am using linux mint 19 cinnamon – bishal Jul 20 '18 at 07:43
  • 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 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 07:51
  • You might not want to make it permanent. – Rui F Ribeiro Jul 20 '18 at 08:32
  • Please format your text. Like I've already explained, select the block and use the {} button to mark it as a code block. – Chris Davies Jul 20 '18 at 16:44

3 Answers3

3

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)

DimiDak
  • 232
  • 2
  • 7
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."

John Smith
  • 2,779
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
guiverc
  • 293