Mostrando postagens com marcador Hostname. Mostrar todas as postagens
Mostrando postagens com marcador Hostname. Mostrar todas as postagens

quarta-feira, 16 de junho de 2021

Ubuntu change hostname command

 The procedure to change the computer name on Ubuntu Linux:

  1. Type the following command to edit /etc/hostname using nano or vi text editor:
    sudo nano /etc/hostname
    Delete the old name and setup new name.
  2. Next Edit the /etc/hosts file:
    sudo nano /etc/hosts
    Replace any occurrence of the existing computer name with your new one.
  3. Reboot the system to changes take effect:
    sudo reboot

segunda-feira, 28 de agosto de 2017

Alterar hostname no GNU/Linux sem reboot

Segue dica simples e direta:

1. Ajuste o novo nome no /etc/hosts:
# vim /etc/hosts

2. Ajuste o nome no arquivo /etc/hostname, executando:
# echo "NOVO_NOME" > /etc/hostname

3. Ajuste o nome direto em memória (a grande sacada):
# echo "NOVO_NOME" > /proc/sys/kernel/hostname

4. Faça logoff e login e já estará com novo nome.

Pronto!!



Fonte: https://www.vivaolinux.com.br/dica/Alterar-hostname-no-GNULinux-sem-reboot