The command to view the hostname in a terminal is simple; just typing hostname and hitting return will show you what the hostname for the system is.
The way to change the hostname is not obvious. There is a configuration file in a folder called /etc/sysconfig called network. By default it contains:
NETWORKING=yes
HOSTNAME=hostname
where hostname is the name you chose while running the original installer, just change the name using nano and save. The change appears to be effected immediately.
Remember: you need to be root to do this.