how to change hostname by centos code example Example: set hostname centos 7 hostnamectl set-hostname <mention the host name>