How to configure Static IP Address on Ubuntu

There are two ways in which a system can get its IP address first is  DHCP server second if you configure it statically. By default when Ubuntu is installed it takes IP from the DHCP server. But we need static IP to connect to server for SSH or to access any other services that will be running on it.

Configuring static IP on Ubuntu is very easy. This article will guide you through how you can configure it.

This post to configure static IP will help you till Ubuntu release 17, if you are running  Ubuntu release 18 then you can check out my post on configuring static IP address on Ubuntu 18 because on Ubuntu 18 there is a big change on how you configure static IP addresses.

Configuration File /etc/network/interfaces

The network configuration are stored in /etc/network/interfaces file and following is its default configuration with DHCP.
The network interface name here is enp0s3 it may be different for you.


Update The Primary Network Interface to Static

Edit the /etc/network/interfaces file.

# vim  /etc/network/interfaces

Then  change the dhcp to static and add the following lines to primary network interface.

iface enp0s3 inet static

 I prefer to use the IP address that is already assigned to  machine you can find that out with simple ip r command as follow. If you don’t want to use this IP you can use any other available IP in your network.


Restart the Network Service

Save the /etc/network/interfaces file changes and restart the network service.

# service  networking  restart

That’s it you have successfully changed the IP address from DHCP to Static.
Happy Networking.

1,379 Replies to “How to configure Static IP Address on Ubuntu”

  1. Tadalafil (Cialis) is a prescription medication particularly designed for men struggling with the outcomes of erectile dysfunction – a problem that prevents them from obtaining an erection that would be hard sufficient to make love. tadalafil no prescription has been reported to heighten several of the effects of substance abuse to lower blood tension – angiotensin II receptor blockers (eprosartan, irbesartan and candesartan), bendrofluazide, enalapril and metoprol. You will certainly should speak to your health and wellness care service provider before beginning the treatment to see to it this drug will certainly be efficient for you and there are no contraindications. Symptoms of a cardiovascular disease are: discomfort in the neck, breast, jaw or shoulder, intense frustration, lightheadedness, stomach discomfort, queasiness, eyesight modifications or fainting. So, if you seem like maximizing all those benefits, all you should do is examine out our secure contrast web page, locating several good drug stores we picked for you and other consumers, hoping you will certainly appreciate the truth you could go shopping for your Tadalafil without having to search for a pharmacy like that yourself. Unless you understand for sure the drugs you are taking are not visiting communicate regarding Tadalafil, consult your doctor to know more.

  2. I just could not leave your web site before suggesting that I actually
    loved the usual information an individual provide on your guests?
    Is going to be back steadily to check out new posts

  3. An intriguing discussion is definitely worth comment.
    I do believe that you ought to publish more about this topic, it may not be a
    taboo matter but typically people do not discuss these topics.
    To the next! Kind regards!!

  4. Good day! I could have sworn I’ve visited this website before
    but after browsing through some of the posts I realized it’s new to me.
    Nonetheless, I’m certainly pleased I found it and I’ll be bookmarking it and checking back regularly!

  5. Hello, i read your blog occasionally and i own a similar one and i was just curious if you get
    a lot of spam responses? If so how do you prevent it, any plugin or anything you can advise?
    I get so much lately it’s driving me crazy so any support is very much appreciated.

  6. I’m amazed, I must say. Seldom do I come across a blog that’s both
    educative and interesting, and without a doubt, you have hit
    the nail on the head. The issue is something too
    few people are speaking intelligently about. Now i’m very happy
    I found this during my search for something concerning this.

  7. It’s appropriate time to make some plans for the long run and
    it is time to be happy. I have read this post and if I could I want to suggest you few interesting issues or suggestions.
    Perhaps you can write next articles referring to this article.
    I wish to read even more things approximately it!

  8. After looking at a handful of the blog articles
    on your site, I really appreciate your technique of writing a blog.
    I book-marked it to my bookmark webpage list and will be checking back in the near future.
    Please check out my web site too and let me know your opinion.

  9. [url=]can you buy diflucan over the counter in usa[/url] [url=]albendazole buy canada[/url] [url=]generic for diovan[/url] [url=]lipitor generics[/url] [url=]valtrex brand cost[/url] [url=]where to buy amoxicillin 500mg[/url]