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…
@eliasp That is: (from within rootful Podman container via distrobox)
cat /etc/hostname
dev.ar.al
systemctl --user list-machines
NAME
fedora-distrobox-root-36.dev.ar.al (host)
@aral the fact, that "list-machines" provides output is most likely the inconsistency here, as machines are also global.
The difference between #systemd's "--system" and "--user" mode is, whether something is managed within a user's resources and/or session, like user units/services running within a user's login/desktop session.
This has nothing to do with a users permissions to control services in the system context, for which privileges are granted via #DBus through #PolicyKit