How to Set or Change Hostname in CentOS/RHEL 7/8

Stapes 1: # vi /etc/hostname

Stapes 2: press  i  button

Stapes 3: Overtight if existing or type your hostname like  kir2.carrothost.com
after that press the Esc button and type wq!  press Enter

Leave a Comment

Scroll to Top