how to update hostname in centos 7 code example Example: centos change hostname # hostnamectl set-hostname your-new-hostname