Changing the hostname
greg zegan
gjzegan at yahoo.com
Mon Aug 19 16:31:40 MST 2024
Did that work?Great question by the way.
On Monday, August 19, 2024 at 04:30:31 PM MST, Keith Smith via PLUG-discuss <plug-discuss at lists.phxlinux.org> wrote:
Solution : hostnamectl set-hostname --transient <hostname>
It appears there is a thing called transient hostname.
On 2024-08-19 09:10, Keith Smith via PLUG-discuss wrote:
> 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: PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list: PLUG-discuss at lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20240819/ad302f1e/attachment.htm>
More information about the PLUG-discuss
mailing list