RedHat 8 – How to define system Hostname

RedHat 8 System Hostname – Using hostnamectl

Learn how to define your system hostname on Red Hat 8 locally or remotely. Use pretty names on your system using hostnamectl tool to easily identify your machines.

Redhat System hostname

Verify System Info

First let’s check our system status and check our current hostname.

hostnamectl status

Define System Hostname

hostnamectl set-hostname

Define Pretty Hostname

hostnamectl set-hostname "Certifications - Notes" --pretty

Clear System Hostname

hostnamectl set-hostname ""

Change Hostname Remotelly

hostnamectl set-hostname -H [username]@certificationsnotes

Using nmcli to define Hostname

nmcli general hostname
nmcli general hostname

Leave a Reply