Change IP Debian 9

# Log in as root or su to root then
nano /etc/network/interfaces
# Should look like this:
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

And change it to:

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 192.168.1.202
        netmask 255.255.255.0
        gateway 192.0.1.1


when done: service networking restart
if the interface fails type: ifup eth0

Close Menu