(Last Updated On: August 12, 2018)

In our Last Tutorial We talked about how to Configure Static IP address in CentOS 7.0 and RHEL, today we are going to configure static IP address on Ubuntu server 14.04. After installing Ubuntu 14.04 Sever, it is configured to Automatically use DHCP server to get IP related information. This means that you will have to configure Static IP address Manually. Install it using USB Flash Drive.

If you are new to Linux you may consider reading Top 20 Basic Linux Most Used Commands for Newbies with Examples. Having GUI interface on the server is not a good idea but good for easy management on a Home server. To get a Static Ip Address on Ubuntu server 14.04, you’ll edit interfaces configuration file located at /etc/network/interfaces. If you like vi editor or nano you can use any of them. In this example, we’ll use vim editor and an IP address of 10.10.1.5, netmask 255.255.255.0.

Open /etc/network/interfaces

sudo vim /etc/network/interfaces

or

sudo nano /etc/netwok/interfaces

Then add the following lines replacing with your IP information.


# MY STATIC ADDRESS CONFIG
iface eth0 inet static
address 10.10.1.5
netmask 255.255.255.0
dns-servers 8.8.4.4
gateway 10.10.1.1

Save the configuration changes and quit.
DNS server entries can be placed inside /etc/resolv.conf file. Simply execute

sudo echo nameserver 8.8.4.4 >> /etc/resolv.conf

For the changes to take effect, restart your network daemon by

sudo ifdown eth0
sudo ifup eth0

NOTE: The service network restart command doesn’t  work on Ubuntu server 14.04

Check that you have an ip address on eth0 interface by typing

sudo ifconfig -a

If you cannot see ip address, gateway, and netmask info, restart your computer. Just type the command reboot on the terminal

sudo reboot

Other Tutorials that you may Like
How To install Themes On Kali Linux As Non-Root User
Top Ten Must Do Things After installing Kali Linux
Top KDE Plasma themes