- Editar el archivo /etc/hostname y colocar el nuevo nombre del equipo
$ sudo gedit /etc/hostname
nombre_nuevo
(Lo único que contiene este archivo es el nombre del equipo). - Editar el archivo /etc/hosts y cambiar el nombre anterior del equipo por el nuevo
$ sudo gedit /etc/hosts
Cambiar:
127.0.0.1 localhost
127.0.1.1 nombre_anteriorPor:
127.0.0.1 localhost
127.0.1.1 nombre_nuevo
Listo, al reiniciar ya estará el nuevo nombre del equipo.
hostname
forma uno:
bash-3.01$ sudo hostname nombre
forma dos:
bash-3.01$ sudo echo “nombre” > /etc/hostname
forma /etc/hosts:
bash-3.01$ sudo vim /etc/hostname
——–
Es lo que haces cuando no tienes X11 😛
Gracias por el dato su :D.
Una duda,
¿mantiene el cambio al reiniciar el equipo?
rtfm
Yo creo que si, al igual que domainname, dnsdomainname, nisdomainname, ypdomainname y nodename.
Todos muestran o editan.
“Note, taht only the super-user cab change the names.
It si not possible to set the FQDN or the DNS domain name with the dns-domainname command (see THE FQDN below).
The host name is usually set once at system startup in /etc/rc.d/rc.inet1 or /etc/init.d/boot (normally by reading the contents of a file which contains the host name, e.g. /etc/hostname).”
hostname — Linux manual