1. Edit the interface file
cd /etc/network vi interfaces
2. Comment the dhcp config
## dhcp configuration # iface eth0 inet dhcp <- Comment this
3. Uncomment the static config and change the config according to your network
# static ip configuration iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1
4. The whole config for your reference
# interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback auto eth0 # dhcp configuration # iface eth0 inet dhcp # static ip configuration iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1