FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
somehow i think my computers hostname has been changed. I am using fedora 7. When I turn on the computer I am prompted to login to laptop instead of localhost. So that after I log on it says username@laptop. I dont think I changed anything that would have anything to do with the computers hostname, and I dont really know how to change it back. My hosts file only contains the line 127.0.0.1 localhost.localdomain localhost.
/etc/sysconfig/network says the hostname is localhost.localdomain and /etc/hostname appears to be blank.
Distribution: Red Hat CentOS Ubuntu FreeBSD OpenSuSe
Posts: 243
Rep:
Quote:
Originally Posted by esgaroth
somehow i think my computers hostname has been changed. I am using fedora 7. When I turn on the computer I am prompted to login to laptop instead of localhost. So that after I log on it says username@laptop. I dont think I changed anything that would have anything to do with the computers hostname, and I dont really know how to change it back. My hosts file only contains the line 127.0.0.1 localhost.localdomain localhost.
/etc/sysconfig/network says the hostname is localhost.localdomain and /etc/hostname appears to be blank.
I don't think you need to edit any files to set the hostname. The command 'hostname' is there to do that. Try 'man hostname' to see what it'll let you do.
True; however what the hostname command does is not saved between reboots, hence the need to put the value into /etc/sysconfig/network.
Startup scripts are written in a way that hostname is called with the name you put in the config file.
Well as I said in the original post the /etc/sysconfig/network file says the hostname is localhost. Here are the actual contents of the file:
NETWORKING=yes
HOSTNAME=localhost.localdomain
your system might be picking up the name from the local DNS.
Quote:
Originally Posted by esgaroth
Well as I said in the original post the /etc/sysconfig/network file says the hostname is localhost. Here are the actual contents of the file:
NETWORKING=yes
HOSTNAME=localhost.localdomain
Distribution: Red Hat CentOS Ubuntu FreeBSD OpenSuSe
Posts: 243
Rep:
Quote:
Originally Posted by esgaroth
Well as I said in the original post the /etc/sysconfig/network file says the hostname is localhost. Here are the actual contents of the file:
NETWORKING=yes
HOSTNAME=localhost.localdomain
replace HOSTNAME=localhost.localdomain to HOSTNAME=mylaptop.intra.yourdomain.com or any host you prefer, save then reboot. edit it using vi.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.