I'm not really sure what you are reporting. hostname is not meant to persistently change the hostname.
Please disregard my comments regarding the 'hostname' command. I failed to note that its use is only temporary until the next reboot. My bad.
Changing hostname using 'raspi-config' works properly with cloud-init as long as Imager is not used or the 'Customisation: Choose hostname' option in Imager is left blank (default = raspberrypi).
Removing the 'hostname: ...' entry in /boot/firmware/user-data will also correct the problem.
Statistics: Posted by RonR — Tue Dec 09, 2025 8:04 pm