I based these instructions from: http://askubuntu.com/questions/9540/how-do-i-change-the-computer-name
If, for whatever reason you need to change your hostname, as I had to, you need to edit the computer name in two files:
/etc/hostname
and
/etc/hosts
These will both need administrative access, so run
gksu gedit /path/to/file
Replace any instances of the existing computer name with your new one.
Note: If you don’t have gksu installed, you need to: sudo apt-get install gksu
When complete
run sudo service hostname restart or restart your computer and the name will have been changed.
For Fedora:
See: http://www.putorius.net/2013/09/how-to-change-machines-hostname-in.html
First: The “hostname” command.
You can use the hostname command to see the current host name of the system.
# hostname
bighat.putorius.net
You can also use the hostname command to change the host name of the machine.
# hostname smallhat.putorius.net
Then issue the hostname command again to see the changes.
# hostname
smallhat.putorius.net
This only makes a temporary or non-persistent change of hostname.
Second: The /etc/sysconfig/network configuration file. (preferred method)
In order for the change to survive a reboot, or to make it persistent, you must change it in the /etc/sysconfig/network file.
Open the file in your favorite editor and change the following line to reflect your desired hostname.
HOSTNAME=newname.putorius.net
After making changing to the configuration file you need to restart the network service in order to read that file.
/etc/init.d/network restart