hehe, so … if you ever change the hostname of a Linux machine, you really really ought to double-check /etc/hosts to make the same hostname change there
it’s surprising just how much will break if a machine’s own hostname isn’t resolvable to a 127.x.x.x address :P
Interesting. I’ve changed my hostname on a few machines throughout the past and never ran into this. Good to know of I ever run into this in the future.
I know this is the preferred way to do it now, but I sometimes worry that abstracting where things are configured in an is that configures everything in a file.
You used to only have to check two places to change a hostname.
Oldmanyellsatsky.jpg
yep, I used that command to modify the hostname, rather than edit /etc/hostname directly
Nothing is worse than waiting for sudo to time out. I forget how long it would take, but it always feels like ages.
This reminds me… My server demands to be known as hostname.local on my network. The other machines just respond to just hostname. I really should figure out why that is.
Domain search suffixes
I use DHCP for everything, even my server, with a reserved IP address in the router for the server and my desktop and a few other things I don’t want to move around (printers, some IoT things, Home Assistant, etc.).
I think the issue is the bridge interface I have to set up for Home Assistant.
.local is usually avahi / bonjour - could be some machines are running it, others aren’t
Lost my mind a few years ago over this quirk. Now I always change both files when I want to change the hostname.
It’s always been wild to me how the seemingly-simplest change (“what is the name of this computer”) has so many little gotchas and quirks.
If you have myhostname set for hosts in /etc/nsswitch.conf it shall take care of this for you (should be the default on most systemd distros I believe? not sure)
i’m guessing a few things somehow consume /etc/hosts mappings without going through nss /shrug




