5

I can do this via network setting's manual dns input field yet if I like to manage it via terminal (ssh), what may I do to accomplish this?

1 Answer 1

6

Open the file /etc/systemd/resolved.conf in a text editor and make the desired changes. Afterwards run sudo systemctl restart systemd-resolved to activate the changes.

Common options to change in that file are in the [Resolve] section, for example:

DNS=192.168.1.1
Domains=mynet

Will set your dns server and search domain.

The resolved.conf manual page is a good source for information on how to edit the configuration file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.