How to add option to /etc/resolv.conf under systemd?
Chris Green
cl at isbd.net
Thu Feb 27 23:07:41 UTC 2020
On Thu, Feb 27, 2020 at 04:39:18PM -0600, Wynona Stacy Lockwood wrote:
> On Thu, Feb 27, 2020 at 4:07 PM Chris Green <[1]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!
>
Doing that seems to stop the systemd defaults from
/usr/lib/systemd/resolv.conf from getting installed, is that supposed
to happen?
--
Chris Green
More information about the ubuntu-users
mailing list