changing localhost
I'm confused on how to change the name of my machine from localhost. when I type "hostname testmachine" it changes the name to testmachine, but when I reboot, the name is changed back to localhost
I have edited the /etc/hosts file, but this doesn't seem to do anything. Can anybody tell me how to change the name of my machine to something else (ie so the prompt reads: [endfx@testmachine /]$ ) Thanks |
put you host name in the file '/etc/hostname'
and please use the search before you post a question. |
sorry, I should have mentioned this above
I don't have the file /etc/hostname Thats whats confusing me. It seems to be getting the hostname from somewhere else everytime I boot. As mentioned above I changed /etc/hosts and used the hostname command to change it, neither of which seem to be working. I'm using mandrake9.1 Am I missing something very simple here? thanks |
Try using:
hostname yourhost.com |
Put the desired hostname in front of localhost.domain localhost in /etc/hosts. I believe that should do it.
Quote:
Skye |
create a the file '/etc/hostname' network will see if the file is there. if it is it will read form there.
or you can put the line below in the file '/etc/sysconfig/network' HOSTNAME=yourhostname |
Thanks, thats what I needed
I added the line HOSTNAME=whatever to /etc/sysconfig/network that worked, thx |
All times are GMT -5. The time now is 02:30 AM. |