System Admin Configuring a static IP address in Ubuntu To configure a static IP address in Ubuntu from the command line, you will need to edit /etc/network/interfaces sudo vim /etc/network/interfaces iface eth0 inet static address 192.168.2.156 netmask 255.255.255.0 gateway 192.168.2.1