How to add dns search suffixes?

I can’t seem to get this to work. I can open /etc/systemd/resolved.conf, but it’s empty. There was a recommendation made (see below) in a different thread, but I don’t quite get the file path mentioned:

Sorry, I forgot NetworkManager is using systemd-resolved anyways. You were right to create /etc/systemd/resolved.conf or /etc/systemd/resolved.conf.d/*.conf . It doesn’t exist by default because of Clear Linux’s stateless design. Just follow the resolv.conf syntax and it will work (i.e.

[Resolve]
Domains=

and systemctl restart systemd-resolved afterwards

When I try to use the suggested path:

udo nano /etc/systemd/resloved.conf.d/.conf
zsh: no matches found: /etc/systemd/resloved.conf.d/
.conf

Are you sure that /etc/systemd/resloved.conf.d/.conf is the correct path to your config file?

Check the spelling.

I’m sorry, but I’m not sure I follow you. The path was suggested in a thread here. I just pasted it into my terminal.

/etc/systemd/resolved.conf.d/*.conf

  • is a wildcard that you need to replace it with valid characters.

Also in your last post, you misspelled ‘resolved’ as ‘resloved’.

Thank you for the clarification.

I enabled view hidden files, but in systemd the only thing I see is a single folder called system. In there is a single folder called multi-user.target.wants

[ -d /etc/systemd/resolved.conf.d ] || sudo mkdir -p /etc/systemd/resolved.conf.d
[ -f /etc/systemd/resolved.conf.d/XXX.conf ] || sudo touch /etc/systemd/resolved.conf.d/XXX.conf

Create the /etc/systemd/resolved.conf.d/ directory if it doesn’t exist. Then create the file XXX.conf if it doesn’t exist, where XXX is any filename of your choice. Then you can edit it.

That worked!

Thank you!

1 Like