To change the hostname in CentOS 7, you have to do four things: 1. Modify /etc/sysconfig/network HOSTNAME=hostname.domain.com 2. Modify /etc/hosts Find: 127.0.0.1 localhost localhost.localdomain localhost4
Try this command first too change your hostname: hostnamectl set-hostname newhostname Exit the terminal, and come back in. If that doesn’t work, also check the