• Like 0

    Resolv.conf - Preserving Search Names Upon Reboot


    Hello,

    As the subject states, I’m adding some additional search names to my /etc/resolv.conf file so I don’t have to type out the fully qualified domain name when I want to SSH to a server.

    I made these changes to the resolv.conf file and everything works as expected. However, when I restart my machine, the file gets reset and my changes are gone.

    How do I preserve the changes I make to the resolv.conf file? OR should I be making these changes in a different file?

    Thanks in advance for everyone’s time and help, it is greatly appreciated!

  • Like 0

    Anyone that can help please?

  • Like 0

    @a4orce84

    Hi

    Preserve DNS settings

    dhcpcd, netctl, NetworkManager, and various other processes can overwrite /etc/resolv.conf. This is usually desirable behavior, but sometimes DNS settings need to be set manually (e.g. when using a static IP address). There are several ways to accomplish this.

    If you are using dhcpcd, see #Modify the dhcpcd config below.
    If you are using netctl and static IP address assignment, do not use the DNS* options in your profile, otherwise resolvconf is called and /etc/resolv.conf overwritten.
    

    With NetworkManager

    To stop NetworkManager from modifying /etc/resolv.conf, edit /etc/NetworkManager/NetworkManager.conf and add the following in the [main] section:

    dns=none

    /etc/resolv.conf might be a broken symlink that you will need to remove after doing that. Then, just create a new /etc/resolv.conf file.

    Source: Arch wiki

    Regards

  • Like 0

    @a4orce84
    You may wanna try this solution, it works for me:
    /etc/resolv.conf is not saving after server reboot

preserving2 names1 resolv.conf1 search5 Posts 4Views 68
Log in to reply