How to setup a Static IP Address in Ubuntu

This is for system Administrators and power Users

How can you Setup a Static IP Address from command Line.
This is applicable for Debian / Ubuntu and Its Clones

First You have to remove Network Manager .

Then edit the file /etc/network/interfaces with admin privilege

$ gksu gedit  /etc/network/interfaces

add the Ip as per  your needs ( example I am Going to setup  IP address

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0

# The primary network interface
auto eth0
iface eth0 inet static

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s