1. Open the /etc/network/interfaces file in an editor, like vim or nano.
![How to Configure Static IP on Debian 10](https://opentechtips.com/wp-content/uploads/2022/04/StaticIPonDebian_01.png)
2. Change the IP configuration on the interface you connected to your network. In this example below the interface is called eth0. You might have a different name in your system.
Change the type from dhcp to static and the desired IP address with the subnet mask, and the default gateway like shown below.
![How to Configure Static IP on Debian 10](https://opentechtips.com/wp-content/uploads/2022/04/StaticIPonDebian_02.png)
#/etc/network/interfaces # 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 eth0 iface eth0 inet static address 10.0.255.1 netmask 255.255.255.0 gateway 10.0.255.254
3. Lastly either reboot the server or run these commands to activate the new configuration:
systemctl restart networking ifup eth0
![How to Configure Static IP on Debian 10](https://opentechtips.com/wp-content/uploads/2022/04/StaticIPonDebian_03.png)
Comments