The file is located in /etc/.
If you are comfortable working in a *nix shell, just edit /etc/hosts. You will need superuser privileges to make changes to this file. So, in a terminal window, type:
sudo pico /etc/hosts
and hit enter.
Move to the bottom of the window and type in the relevant information (the PC's local IP address, and the hostname you wish to use to access the PC).
Save the hosts file with ^O followed by Enter and then exit pico with ^X.
At this point, you should be done.