Configure Static IP Address and Set DNS in Ubuntu 15.10 Desktop and Server

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Marin Todorov

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

13 Responses

  1. Jaidev Shah says:

    Wonderful post. Very simple and to the point. Thank you!!!! Keep it up!!!

  2. Vincent Regouby says:

    Hi, why when we use the desktop method, the interfaces file does not get updated ? Where does the desktop tool write the information ?

    • Marin Todorov says:

      That’s actually a very interesting question and I did not think about it before. I just configured a static IP on one of my Ubuntu boxes and used grep from /etc/ folder recursively to search for that IP. The IP address was written in:

      /etc/NetworkManager/system-connections/Wired\ connection\ 1

      So if you need to look where the desktop tool has written your settings, you can look at:


  3. shapourthesecond says:

    Great article just wondering about this part: “Remember to replace “enp0s3” with the name of your network adapter??? what do u mean by this? do you mean we should not change this name enp0s3 or changed with our network adapter?

  4. Nikon says:

    Sorry for my english, I would put a secondary IP in the same interface, like old versions (eth0… eth0:1 I know how to do it in the old versions, but in version 15.10, they have changed the commands. Can you help me?

    • Marin Todorov says:

      Hello Nikon,

      As the answer of this question is too long for the comment section, I would recommend you to submit your question to our Linuxsay discussion forum, where we will gladly provide more details:

  5. Pat Anablak says:

    Where do the Nameserver numbers obtained? Elaborate on “Make sure to use your own settings depending on the network to which you are connected to.”

  6. Pat Anablak says:

    Can you please expand on this?
    IMPORTANT NOTE: For the purpose of this tutorial, I will be using the following settings:

    IP Address:
    Make sure to use your own settings depending on the network to which you are connected to.
    Where do you obtain the Nameserver numbers?

    • Marin Todorov says:

      Hi Pat,

      This depends on few things:

      If your machine is connected to a router, you should see the settings in there.

      If you are plugging your ISP’s internet cable directly to your computer (i.e no router, modem etc), you should use your ISP’s settings.

      • Nikon says:

        I want 1st IP by DHCP and 2nd static but, in Ubuntu 15.10 mi interface isn’t eth0 it is eno1 and if I put eno1:1 don’t works.

  7. Marin Todorov says:

    Actually the init script does exactly that – it calls systemctl. You can see it in the screenshot:

    “restarting networking (via systemctl): networking service”

    Both scripts do the same.

  8. Arthur says:

    Why not use systemd to restart networking directly?

    `systemctl restart network`

Leave a Reply to Arthur Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.