man hostname
"hostname - show or set the system’s host name"
Does the already provided "hostname" command not work for you?
--
(This box runs FC5, my others run FC4 & FC6, in case that's
important to the thread.)
Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.