Perintah yang dianjurkan pada OS yang menggunakan Systemd

hostnamectl --static set-hostname hostname

tetapi sayangnya perintah tersebut selalu error (di template Debian 8 Linode), solusi belum ditemukan ;)

$ hostnamectl --static set-hostname dek.jaranguda.com
Could not set property: Connection timed out

log lengkapnya

Jan 21 11:58:03 localhost dbus[2869]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Jan 21 11:58:03 localhost systemd[1]: Starting Hostname Service...
Jan 21 11:58:03 localhost systemd[24337]: Failed at step NAMESPACE spawning /lib/systemd/systemd-hostnamed: Operation not permitted
Jan 21 11:58:03 localhost systemd[1]: systemd-hostnamed.service: main process exited, code=exited, status=226/NAMESPACE
Jan 21 11:58:03 localhost systemd[1]: Failed to start Hostname Service.
Jan 21 11:58:03 localhost systemd[1]: Unit systemd-hostnamed.service entered failed state.

solusinya

Jalankan perintah dibawah ini

echo "jaranguda" > /etc/hostname

ganti jaranguda dengan hostname yang anda inginkan. Terakhir reboot system anda, agar perubahan terjadi menyeluruh.

Leave a comment

Your email address will not be published. Required fields are marked *