redhat 6 hostname change via command code example Example: change hostname rhel 6 HOSTNAME="server1.cyberciti.biz"