Modificar o hostname no Linux

Para chegar o hostname da sua máquina, execute o seguinte comando:

hostnamectl

Para modificar execute o seguinte comando:

sudo vim /etc/hostname

Para editar, pressione a letra “i”. Após a edição pressione a tecla ESC e depois “:wq”. Se quiser apenas sair, pressione “:q”. Para ignorar a modificação é o “:q!”.

Após executado o comando, reinicie o Apache para ter certeza que tudo estará funcionando perfeitamente:

sudo service apache restart

1 comentário em “Modificar o hostname no Linux”

  1. hey there and thank you for your information – I have certainly picked up something new from right here. I did however expertise some technical issues using this site, as I experienced to reload the website many times previous to I could get it to load correctly. I had been wondering if your hosting is OK? Not that I am complaining, but sluggish loading instances times will sometimes affect your placement in google and can damage your high quality score if advertising and marketing with Adwords. Well I’m adding this RSS to my email and can look out for a lot more of your respective fascinating content. Ensure that you update this again soon..

Deixe uma resposta