Easily changing hostname on a Linux machine w/ systemd

Changing the hostname on a system is a surprisingly tedious process on a Linux host. Different distributions manage it with different files or tools, and sometimes if you forgot one you could hose some integral components.

If you aren’t using a configuration management tool like Ansible to abstract this, you’ll be happy to find systemd’s approach to this aims to make it universal and easy.

hostnamectl set-hostname yourhostname.blah.com


Leave a Reply

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