hostname changed without me changing anything

US flag

My hostname changed to " systemd-resolved" without my consent on fedora 37. When i type journalctl -u systemd-hostnamed.service

journalctl -xe entry is:

févr. 05 16:27:25 systemd-hostnamed[18393]: Hostname set to <> (transient)
févr. 05 16:27:55 systemd[1]: systemd-hostnamed.service: Deactivated successfully.
févr. 05 16:32:51 systemd[1]: Starting systemd-hostnamed.service - Hostname Service...
févr. 05 16:32:51 laptop-fedora systemd[1]: Started systemd-hostnamed.service - Hostname Service.
févr. 05 16:32:51 laptop-fedora systemd-hostnamed[18679]: Hostname set to <laptop-fedora> (transient)

How can this happen ?

Zareh Kasparian avatar
us flag
I see "cpe-...." in your logs. are you connecting your laptop to a modem or something provide you with an IP address?
cw flag

Fedora simplified the old install process and skips setting a hostname. As you can see, it is showing the transient hostname in both cases. Per the hostnamectl manpage, the transient hostname is a fallback received from the network configuration if there is no static hostname set.

You should manually set a hostname. This can be done by running sudo hostnamectl hostname HOSTNAME (where HOSTNAME is whatever you want it to be). This will update the static hostname and takes priority over transient ones, and will not change.

HPVectra avatar
cw flag
You can check the man page for hostnamectl -
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.