Categories
Tutorial

How to Set or Change Hostname in CentOS 7/8

To set or change hostname on CentOS 7/8 use the command:
hostnamectl set-hostname your-new-hostname

Check your hostname:
hostnamectl or hostname