How to configure static ip address

Debian Linux ( Classic way)

1. Check your interface name

ip a

Example interface: ens33 or enp0s3

2. Edit interfaces file

sudo nano /etc/network/interfaces

3. Example Static IP Configuration

(Replace enp0s3, IP, gateway)

auto enp0s3
iface enp0s3 inet static
    address 192.168.1.69
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 1.1.1.1

Save and exit.

4. Restart networking

5. Verify

Last updated