I’m seeing the same behavior on Ubuntu 24.04 and 25.04. Hostname changes via GUI or `hostnamectl` don’t update `/etc/hosts`, which leads to confusing issues.
I understand the suggested workaround is to use `libnss-myhostname`, but adding a disclaimer or an automatic `/etc/hosts` update would improve usability significantly, especially for desktop users. Details and examples here: https://anagogistis.com/posts/hostname-change/ https://anagogistis.com/posts/sudo-hang/ -- You received this bug notification because you are a member of Debcrafters packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/2067333 Title: hostnamectl --set-hostname doesn't update /etc/hosts Status in systemd package in Ubuntu: Won't Fix Bug description: hostnamectl is a System API that updates all important OS references to the hostname, so the operator does not need to know them. Having to manually update /etc/hosts defeats the purpose of having the System API & leaves the OS in an inconsistent state To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2067333/+subscriptions -- Mailing list: https://launchpad.net/~debcrafters-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~debcrafters-packages More help : https://help.launchpad.net/ListHelp

