mastodon.ar.al is one of the many independent Mastodon servers you can use to participate in the fediverse.
This is my personal fediverse server.

Administered by:

Server stats:

1
active users

Am I missing something or should hostnamectl not have a --user mode similar to systemctl? (It doesn’t currently.)

@aral no, because a system's hostname is global.

@eliasp But it could still give you information about it without allowing you to change it. systemctl --user list-machines does, for example.

That said, still not sure if that’d just be more confusing or more consistent…

@eliasp And, actually no, so systemctl --user list-machines is giving me the hostname of my container, not the host. And yet, I see no way of changing that. Hmm…

@aral @eliasp normally you set a container hostname up in the initialization script i.e. `-h=xxxxx`, in podman at least, I assume docker is the same, not sure about others
Aral Balkan

@paul @eliasp Yeah. This is more for the server I’m writing to automatically bind to the hostname if one isn’t manually specified. It’s not a biggie, I can just read /etc/hostname directly. I was just thinking there would be a way to get that information from hostnamectl :)

@aral @eliasp ah, OK, I see
Other containers I have used use a mandatory environment variable to set a "bind_address" or something similar - removing the need for checking the actual hostname dynamically
A fallback to actual hostname would be good in some cases though