By Heidy RamirezMay 14th 2021

In this tutorial, we're going to learn how to change the static and "pretty" hostname.

The static hostname can be chosen by the user and is stored in the /etc/hostname fill

The “pretty” hostname is a free-form UTF8 host name for presentation to the user.

The “hostnamectl” Command:

hostnamectl

running this will show you your current static hostname. Notice by default there's no "pretty" hostname.

Change the static hostname

hostnamectl set-hostname [static-hostname] --static

Change the "pretty" hostname

hostnamectl set-hostname ["pretty-hostname"] --pretty

You can confirm your changes by running:

hostnamectl
)