How to set static IP address and DNS in Ubuntu 15.10 desktop and server

To set static IP address and DNS in Ubuntu 15.10 desktop and server

In this article we will discuss about setting a static IP address and DNS in Ubuntu 15.10 desktop and server.

To assign static IP address to Ubuntu Server

[user1@linuxhelp~]$ ifconfig &ndash a


To open interface file or configure file

[user1@linuxhelp~]$ sudo vim /etc/network/interfaces


To apply the new configuration and restart Ubuntu

[user1@linuxhelp~]$ sudo /etc/init.d/networking restart

OR

[user1@linuxhelp~]$ sudo systemctl restart networking.service


To check if your new IP address has been assigned

[user1@linuxhelp~]$ ifconfig -a


To Set Static IP Address on Ubuntu

Step 1

Start the Unity Dash and check for Network Connections and click the Network connection icons.

Step 2

Now click the wired connection and choose edit option.

Step 3

Select IPv4 settings in new opened window. Now click on IPv4 settings in the drop down menu next to method and select manual. Click Add button to add IP address, Gateway and Subnet mask. And also enter DNS server and search domain’ s IP.

Step 4

Click save button to apply the changes. Use connection icon in top right corner of the desktop panel to reconnect to your network static IP address. If the computer was using Dynamic IP address, before doing this setup disconnect the connection by clicking the icon and connect again.

Step5:

To review your current settings click Connection Information on the panel icon, now it shows your connection status information.

FAQ
Q
Is there any other command to view ip address ?
A
You can use "ip a" to view ipaddress
Q
where we get nameserver details ?
A
You can find under /etc/resolve.conf
Q
How to Change DNS settings on ubuntu?
A
Change it from here "/etc/resolve.conf"
Q
how to down interface ?
A
Use the following commands sudo systemctl stop network 'or' ifdown interface_name
Q
I am facing a WiFi issue on Ubuntu How to fix it ?
A
Try this, sudo service network-manager restart ""OR"" Ignore file not found or errors..` sudo apt-get remove --purge broadcom-kernel-source sudo rm -rf bcma sudo apt-get update sudo apt-