If you want to change your Linux hostname and you’re running Fedora or Red Hat, the steps are listed below.
Immediate Change
echo 'some.host.com' > /proc/sys/kernel/hostname
Persisted Change
This is for non-DHCP nodes.
Add your name to /etc/sysconfig/network
NETWORKING=yes HOSTNAME="some.host.com"
If you’re node gets an IP address from a DHCP server then you can set:
DHCP_HOSTNAME="some.host.com"
in the /etc/sysconfig/network-scripts/ifcfg-eth0 file (or whatever your primary device is).
Notes
You can also add your hostname to your /etc/hosts file
10.1.1.10 some.host.com some

