Use hostnamectl, assuming your systemd version is new enough:

http://www.freedesktop.org/software/systemd/man/hostnamectl.html

Thanks for the suggestion, but unfortunately this doesn't seem to work:

$ hostnamectl set-hostname korath.my.domain.com

$ cat /etc/hostname
korathmydomaincom

$ pacman -Qi systemd | grep Ver
Version        : 197-4

At a suggestion from my distro's discussion forum, manually editing /etc/hostname and putting the FQDN back in there works. So I'm not sure whether this is a bug in hostnamectl or whether editing /etc/hostname is still the preferred way to set a machine's FQDN.

Also for the record the "localhost.localdomain" was because my short hostname was listed against 127.0.0.1 in /etc/hosts. Removing that fixed that issue.

Thanks,
Adam.


_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to