-
Nope, you would need to edit /etc/sysconfig/network and put your hostname in there:
HOSTNAME=myname.mydomain
In addition, it would probably be a good idea to add it to /etc/hosts like this:
127.0.0.1 myname.mydomain myname localhost.localdomain localhost
Edit: These changes would only take effect after a reboot. To make the hostname change immediately, use the hostname command after you change the files:
$ hostname myname.mydomain
-
Nope, you would need to edit /etc/sysconfig/network and put your hostname in there:
HOSTNAME=myname.mydomain
In addition, it would probably be a good idea to add it to /etc/hosts like this:
127.0.0.1 myname.mydomain myname localhost.localdomain localhost
Edit: These changes would only take effect after a reboot. To make the hostname change immediately, use the hostname command after you change the files:
$ hostname myname.mydomain