Red Hat Enterprise Linux ES
Changing the hostname
Well, you can not edit /etc/sysconfig/network to change the hostname. The following is an example of /etc/sysconfig/network.
NETWORKING=yes
HOSTNAME=mymachine
It appears that you could change this file to change the hostname, but it will be overwritten when the computer reboots. Instead, edit /etc/sysconfig/networking/profiles/default/network.
Updating the system
up2date --nox -u -i