how to edit name on host file centos7 code example Example: set hostname centos 7 hostnamectl set-hostname <mention the host name>