Static DNS in Ubuntu Server 16.04
Assuming you are using resolvconf
Open resolvconf config in gedit via
gksudo gedit /etc/resolvconf/resolv.conf.d/original
This should result in a dialog asking for your password and then open the UI texteditor Gedit with the following file: /etc/resolvconf/resolv.conf.d/original
This file usually contains a line like that
nameserver 8.8.8.8 8.8.4.4
This would mean there are to nameserver configured: - 8.8.8.8 and - 8.8.4.4
Edit the file to your needs and save & quit gedit.
Finish with
sudo resolvconf -u
UPDATE:
Just realized this post covers the topic way better then i did.
Related videos on Youtube
E Simon Vijay
Updated on September 18, 2022Comments
-
E Simon Vijay over 1 year
I am a complete new-be when it comes to Linux and even more so when it concerns Ubuntu.
I want to configure the IPv4 settings to have automatic assigning of IP address but manual assigning for DNS. How do I do it?
Please teach me how to do it step by step.
Please take a look at the image to get an idea of what I am asking.
Thank you in advance.
Windows DNS settings example:
-
dufte almost 8 yearsAm i assuming right that you added the windows screenshots only as reference, but you want to change the related data on a ubuntu machine?
-
E Simon Vijay almost 8 yearsYou are absolutely right dufte.
-
-
E Simon Vijay almost 8 yearsThank you so much for the information dufte but I do not have gedit installed. I can't install it too because the network will only work if i change the dns settings. please advise.
-
dufte almost 8 years
gedit
was just an example. you can replacegedit
withnano
as well in the commands. But please follow the url i added to my post as it explains better what to do.