How to add option to /etc/resolv.conf under systemd?

Wynona Stacy Lockwood stacy at guppylog.com
Thu Feb 27 22:39:18 UTC 2020


On Thu, Feb 27, 2020 at 4:07 PM Chris Green <cl at isbd.net> wrote:

> I want to add the option "options single-request" to my
> /etc/resolv.conf file.  As this file is actually a symlink to a file
> created dynamically by systemd at startup it isn't immediately obvious
> how to do this.
>
> So, that's the question, how does one add options to /etc/resolv.conf
> under systemd?
>
> --
> Chris Green
>

Hi Chris! (And list)

Do you have resolvconf installed? If so, you can simply edit the head file,
which you should find at /etc/resolvconf/resolv.conf.d/head which you can
edit with sudo nano.

If you don't have it installed, and wish to use it to help with this, do
the following:

sudo apt update
sudo apt install resolvconf
sudo systemctl status resolvconf.service

If it's not already running for some reason, do the following:

sudo systemctl start resolvconf.service
sudo systemctl enable resolvconf.service
sudo systemctl status resolvconf.service

If that works as expected, you then just do:

sudo nano /etc/resolvconf/resolv.conf.d/head

and add what you want to the file. Save your changes, and then:

sudo systemctl start resolvconf.service

At this point, you should basically be done.

NEAT find on options single-request! I hadn't seen that before, but it
makes a lot of sense, and I'm now using it as well!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20200227/84e5b6a9/attachment.html>


More information about the ubuntu-users mailing list