Results 1 to 3 of 3

Thread: DNS servers resetting after restart

  1. #1
    Join Date
    Nov 2018

    Exclamation DNS servers resetting after restart

    I Am on last Ubunutu/Desktop. Using this command on admin account:
    sudo nano /etc/resolv.conf
    I change DNS servers, then open resolv.conf again to double check. And DNS servers are saved! Then after restart, all saved settings from resolv.conf are deleted!!! Any ideas why? Thanks!

  2. #2
    Join Date
    Mar 2007

    Re: DNS servers resetting after restart

    Why it works like this I don't have a clue, but recent versions of Ubuntu are designed to rewrite the /etc/resolv.conf file at every reboot.
    Depending on how your system is set up there are different methods for accomplishing this.

    Here is a discussion of various techniques to accomplish that.

    The easiest seems to use the GUI tool to add the DNS servers.

    Goog luck.
    Last edited by rsteinmetz70112; September 8th, 2021 at 09:07 PM.

  3. #3
    Join Date
    Jun 2016

    Re: DNS servers resetting after restart

    I assume you have a good reason to be directly editing /etc/resolv.conf instead of the normal way to change DNS settings on a current Ubuntu desktop.

    Please post output from running this command in Terminal -
    realpath /etc/resolv.conf
    What does /etc/resolv.conf reset to? Next time you perform a reboot and it resets, please post the contents of the reset /etc/resolv.conf file.

    What are you using for networking? e.g. NetworkManager, wicd, netplan, /etc/network/interfaces, ...?
    Xubuntu 22.04, ArchLinux ♦ System76 hardware, virt-manager/KVM, VirtualBox
    When your questions are resolved to your satisfaction, please use Thread Tools > "Mark this thread as solved..."

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts