How to assign a static IP address in Ubuntu February 22, 2014
Antre du Tryphon

How to assign a static IP address in Ubuntu

February 22, 2014 · Admin Ubuntu 11.10 Unix Ubuntu 11.04 Ubuntu Linux Ubuntu 12.04

Setting a static IP address in Ubuntu involves editing /etc/network/interfaces. If the interface is currently using DHCP, you will find these lines in the file. auto lan iface lan inet dhcp You will have to replace the above lines with a section that looks like: auto lan iface lan inet static address 192.168.1.80 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.200 dns-nameservers 8.8.8.8 Make the changes effective by either rebooting or by issuing this command: sudo /etc/init.d/networking restart


Copyright 2012–2026, Claude "Tryphon" Théroux