Impostazioni di rete ipconfig

Installazione classica di ubuntu, terminata la stessa si procede per modificare i parametri della configurazione di rete.

Cambiare l’indirizzo IP

sudo su

nano /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
dns-search workroup

Cambiare nome dell’host, le fonti da cui attingere qui:

Modificare il file /etc/hostname utilizzando l’utente root con:

nano /etc/hostname

Scrivere all’interno del file unicamente il nome del computer, sulla prima riga, uscire con CTRL+X e salvare all’uscita. Applicare quindi il nuovo nome con:

sudo hostname -F /etc/hostname

oppure:
echo nomeserver> /etc/hostname

E infine modificare il file hosts con

nano /etc/hosts

127.0.0.1	localhost
127.0.1.1	nomeserver.ns0.it nomeserver
#192.168.1.2     nomeserver.ns0.it nomeserver

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

/etc/init.d/hostname restart

Per verificare:
hostname
hostname -f

nano  /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND — YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 192.168.1.2
nameserver 127.0.0.1
search nomeserver

per validare il tutto un reboot.