> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How To Make Changes In resolv.conf Permanent in Ubuntu [Quick Tip]
- URL: https://itsfoss.com/resolvconf-permanent-ubuntu/
- Published: 2013-08-18T19:03:12.000Z
- Updated: 2023-01-11T09:56:04.000Z
- Author: Abhishek Prakash
- Tags: Ubuntu, #Import 2022-12-26 08:27

When you change the [DNS](http://en.wikipedia.org/wiki/Name%5Fserver?ref=itsfoss.com) configuration using /etc/resolv.conf file, you must have noticed that the changes are not permanent. A reboot and your changes might revert to the original settings. I had this issue when I changed the DNS setting to [watch Netflix outside USA](https://itsfoss.com/easiest-watch-netflix-hulu-usa/ "Easiest Way To Watch Netflix And Hulu Outside USA In Ubuntu"). Editing resolv.conf solved my problem but for the moment only. My changes were not permanent and when I looked at resol.conf file again, I found why it is so. The file clearly mentioned it and I did not pay attention to it:

```
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
```

So, as said, my changes were overwritten. Editing resolv.conf is good for instant testing but the question arises **how to make changes in resolv.conf permanent in Ubuntu** or any other Linux system.

In this quick tip, I’ll discuss the solution that you could use to make the changes in resolv.conf permanent.

## Make permanent changes in resolv.conf:

To make the DNS related changes in resol.conf permanent, you need to change the DHCP configuration file named **dhclient.conf**. You can find the file in this location: **/etc/dhcp/dhclient.conf**

You’ll see lines like these:

```
#supersede domain-name "fugue.com home.vix.com";
 #prepend domain-name-servers 127.0.0.1;
```

Remove the preceding “#” and use the domain-name and domain-name-servers which you want. Save it. Now the DNS related changes will be permanent.

## Alternate workaround to make permanent changes in resolv.conf:

This workaround needs a program **resolvconf** to be installed in your system. Normally this program is installed in many Linux systems by default but to make sure it is, use the following command in terminal (Ctrl+Alt+T ) in Ubuntu:

```
sudo apt-get install resolvconf
```

Once you have made sure that the resolvconf is installed, edit the configuration file using the following command:

```
sudo gedit /etc/resolvconf/resolv.conf.d/base
```

Save it. Now the settings in resolv.conf will be permanent.

I hope this quick tutorial helped you in changing DNS settings and making those changes permanent. Any questions, suggestions, a word of thanks are welcomed. Ciao :)