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:


  • Am i assuming right that you added the windows screenshots only as reference, but you want to change the related data on a ubuntu machine?
    – dufte
    Jun 10, 2016 at 8:15
  • You are absolutely right dufte. Jun 10, 2016 at 8:17

1 Answer 1


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


This would mean there are to nameserver configured: - and -

Edit the file to your needs and save & quit gedit.

Finish with

sudo resolvconf -u


Just realized this post covers the topic way better then i did.

  • Thank 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. Jun 10, 2016 at 8:22
  • gedit was just an example. you can replace gedit with nano as well in the commands. But please follow the url i added to my post as it explains better what to do.
    – dufte
    Jun 10, 2016 at 8:25

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