LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-22-2006, 09:40 PM   #1
MrVahn
Member
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 77

Rep: Reputation: 15
How will I change computer name after install?


I would like to chang the default computer name (dartstar) to some other name. Is that possible? I opted to use the default during setup but I want to change it now.
 
Old 06-22-2006, 09:42 PM   #2
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Just run 'netconfig' again as root.

There are other ways, but I find this the simplest.
 
Old 06-22-2006, 09:50 PM   #3
FreeDoughnut
Member
 
Registered: Jun 2006
Distribution: Slackware 10.2, Debian Testing/Unstable, Ubuntu Breezy Badger, working on LFS
Posts: 228

Rep: Reputation: 30
Or, to take twice as long but have the fancy green menu for the first part:
Quote:
su
password
pkgtool
Setup->netconfig
 
Old 06-22-2006, 10:06 PM   #4
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
wouldnt the 'hostname' command or the /etc/hostname file work to do this?
 
Old 06-22-2006, 10:09 PM   #5
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
So many things are dependent on it, it's a bit easier to run 'netconfig', and make sure everthing is updated.
 
Old 06-23-2006, 06:10 AM   #6
MrVahn
Member
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 77

Original Poster
Rep: Reputation: 15
Ok then. I'll try netconfig first. I was expecting to edit some text file configurations like what I did in my fstab.
It is good that there is such command associated with my problem. Thanks.
 
Old 06-23-2006, 06:24 AM   #7
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
I think the file /etc/HOSTNAME stores the hostname.
 
Old 06-23-2006, 11:06 AM   #8
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Rep: Reputation: 30
edit /etc/HOSTNAME and edit /etc/hosts and then reboot
 
Old 06-23-2006, 08:31 PM   #9
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Why should a newbie edit two system critical files, with a chance of messing them up (As I have done before) when a simple command will do it for you?

Plus, it will insure the network is setup correctly.

From my take on the OP's original problem, it seems that he skipped the original netconfig. (I could be wrong, but better safe than sorry). If so, then he would be chasing his tail trying to get everything setup. This way: One command, and done.
 
Old 06-23-2006, 09:37 PM   #10
phek
Member
 
Registered: Jul 2001
Location: California, US
Distribution: Slackware
Posts: 196

Rep: Reputation: 30
you want to both edit the /etc/HOSTNAME file and run the hostname command `hostname newhost`. Running the hostname command will change what any program using the gethostname(2) function while I believe /etc/HOSTNAME is for NIS (could be wrong about it being for the NIS system, but it is another system). After you change those two you'll probably want to edit /etc/hosts and fix the host names in there too. Once all that is done, just reboot (i bet theres something you could just restart, however I'm really not sure what it is, agetty probably).

cwwilson721: the reason for giving someone more complex answers rather than just run some random script that does it for you is to teach people how to actually do it on more than just one distribution that happens to have that random script [[note: you've gotta change something else in RH to change the hostname]]. Afterall most people who use slackware are using it to learn because they want to know how linux works, not just one distro.
 
Old 06-23-2006, 09:50 PM   #11
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
That is a valid point.

However, this user is a newbie to Slackware, not RHX, or anything else. Lets get the easy basics down first, with a usable system, then give the more 'in depth' options.

Drowning a newbie in alot of linux-speak can, and does, cause people to just give up.

In this case, simplicity may be best. Complexity can cause harm. I was just trying the easiest route to begin with, then get more in depth on what other possibilities are out there.

Also, I'm not even sure the OP is even paying any attention....

But thanks for the explanation. I just hope you also see why I went this route...
 
Old 06-25-2006, 11:53 AM   #12
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Rep: Reputation: 30
It's funny that some people here think /etc/HOSTNAME and /etc/hosts is a critical system file. lol
 
Old 06-25-2006, 12:00 PM   #13
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Not critical, unless you really want to get online. But they are important
 
Old 06-25-2006, 01:10 PM   #14
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Rep: Reputation: 30
I rimmed out my info in those 2 files and I still get online
 
Old 06-25-2006, 01:20 PM   #15
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
More along the lines of if you need names on an internel LAN, and for some firewalling, etc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer name change BillyGalbreath Debian 3 12-05-2005 11:02 PM
Change computer name l23x4 Linux - Networking 8 07-17-2005 10:47 AM
how to change the name of the computer greghua Linux - Software 2 05-24-2005 08:35 PM
change computer imagineaxion Mandriva 6 11-17-2004 07:33 AM
How to change computer name? tied2 *BSD 3 09-14-2003 04:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration