SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Actually that is what I mentioned.. just use the hostname command.. and come to think of it, the netconfig script will make the updates as well, but unfortunately there is no /etc/hostname file.. at least my Slack boxes don't have that file, never did either..
that's funny and just notice, everyone's reply in this thread either ends with boy or kid..
Actually the proper method is to use /sbin/netconfig that was suggested earlier. If the machine is networked then it is also the best here because the machine is still using the default name of darkstar.example.net then it has not been run at all. If not, then manually changing a file is OK.
The netconfig script writes/creates several files.
/etc/HOSTNAME (note: the uppercase)
/etc/networks
/etc/resolv.conf
/etc/hosts
/etc/rc.d/rc.inet1
That is all that I can recall at the moment. HOSTNAME is the only file that doesn't pertain to networking other than it contains the fully qualified domain name for the others to use.
To change the hostname manually without the networking parts. Modify the /etc/HOSTNAME to contain the name desired and then run the command
hostname new-host-name
If the HOSTNAME file is not modified then it will revert back on the next boot because it will be read by /etc/rc.M script. To my knowledge the hostname command does not modify any files.
If the machine is networked then the /etc/hosts file must also be updated manually.
In one way or another you were all right. Please feel free to correct anything that I may be amiss.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.