Changing the hostname

Página Inicial
Anexos:
Mensagem como email
+ (text/plain)
Delete this message
Reply to this message
Autor: Keith Smith via PLUG-discuss
Data:  
Para: Main PLUG discussion list
CC: techlists
Assunto: Changing the hostname
Hi,

I am changing the hostname on Ubuntu 24.04LTS server.

I do the following:

Change the hostname using sudo vi /etc/hostname
Change the hostname using sudo vi /etc/hosts
Restart : sudo systemctl restart systemd-hostnamed
Verify with : hostnamectl which returns the new hostname

However when I issue the command "hostname" it gives me the old
hostname.

When I do a reboot the command hostname give the new hostname.

Any thoughts why this is?

Thanks!!
Keith
---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss