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
There's another way to change the hostname that isn't etc/hosts?
Isn't this what hostnamectl is supposed to handle?
You guys are having own hostname in hosts file?
Laughs in Alpine.
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
Interesting. I’ve changed my hostname on a few machines throughout the past and never ran into this. Good to know if I ever run into this in the future.
Nothing is worse than waiting for sudo to time out. I forget how long it would take, but it always feels like ages.
Lost my mind a few years ago over this quirk. Now I always change both files when I want to change the hostname.
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)
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.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0