Thursday, January 26, 2017

Set static IP address - Ubuntu

Set static IP address - Ubuntu -----------------------
>sudo nano /etc/network/interfaces
auto lo 
iface lo inet loopback

auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx // Your ip
netmask 255.255.255.0
gateway xxx.xxx.xxx.xxx // Your gateway address
nameserver xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx

>sudo /etc/init.d/networking restart
>ifconfig

Done. 

No comments: