Impostare l’IP fisso su Ubuntu 16.04
1 2 3 |
sudo nano /etc/network/interfaces |
In una installazione vergine darà un risultato simile a questo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# 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 auto enp4s0 iface enp4s0 inet dhcp |
Le linee marcate che fanno riferimento alla interfaccia Ethernet sono quelle da cambiare. Facciamo direttamente un esempio abbastanza ovvio
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# 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 auto enp4s0 iface enp4s0 inet static address 192.168.1.98 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-nameservers 8.8.8.8 8.8.4.4 |
Conviene riavviare a questo punto