Howto setting IP Address on Ubuntu Linux
One of my computer using Linux. Linux that i use is Ubuntu Server. Because i want to learn how to install, configure and manage Linux Server. And I think Ubuntu Server is easy to use.
After install, first thing that I do is setting the network, because i have not set it yet. On terminal or shell, first i have to check which eth that i used,
dmesg | grep eth
It wil show which eth is up. And in my computer because there is only one ethernet card so its name is eth0. Then i open the file configuration
sudo nano /etc/network/interfaces
Above command meaning is as a root i open file interfaces using nano to edit the text inside. In text editor, nano, i include several text below thi
auto lo
iface lo inet loopback
The text that i include are
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.254
Then i save with shortcut Ctrl+O and exit with shortcut Ctrl+X, back to the console. The configuration meaning are i use static ip address, if you use dhcp, you can change static to dhcp. IP address computer is 192.168.0.1, subnetmask 255.255.255.0, gateway 192.168.0.254.
The last step that should I do is restart network using command
sudo /etc/init.d/networking restart
And finish.

Tags: