Joe Robinson

Debian - Static IP addressing

Edit this file with your preferred editor.

nano /etc/network/interfaces

I use nano because I rarely have any issues with it.


Amend the file to look something like this. Most of the time you will only need to make changes below the comment line # The primary network interface

# The primary network interface
#allow-hotplug ens192
#iface ens192 inet dhcp
auto ens192
iface ens192 inet static
address 192.168.100.100
netmask 255.255.255.0
gateway 192.168.100.1
dns-domain <your-domain-name>
dns-nameservers <preferred-dns-server(s)>

Restart networking

systemctl restart networking

Check that the IP address is set correctly

ip a

Done

#debian #how-to #linux