PassioniInformaticaLinux

Versione corretta (solo IP statico su ens18)

17/01/2026

Se vuoi usare solo IP statico 192.168.1.93 con gateway 192.168.1.254, il file corretto e:

# /etc/network/interfaces
source /etc/network/interfaces.d/*

# Loopback interface
auto lo
iface lo inet loopback

# Interfaccia principale ens18 con IP statico
auto ens18
iface ens18 inet static
    address 192.168.1.93
    netmask 255.255.255.0
    gateway 192.168.1.254
    dns-nameservers 1.1.1.1 8.8.8.8

Applica le modifiche

ip addr flush dev ens18
systemctl restart networking
← Come installare ZRAM su 8 GB (1,5 GB ZRAM) Come faccio a vedere quali sono gli IP sulla mi... →
← Torna all'elenco