Setup Static IP Address in Debian Linux

Setting up static IP address in Debian Linux is easy. In this simple guide, I will be configuring the IP address using the old way (ifconfig) and requires that you have system administration rights to do the following steps:

Open the network interface file with the following command:

sudo vi /etc/network/interfaces

Once opened you might see something similar like this

sample network interface configuration

Your interface label might be different from the example but in this case we are interested in making interface ens33 to have a static IP. I configured interface ens33 as follows:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug ens33
iface ens33 inet static

Leave a Reply