LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 06-24-2004, 02:27 AM   #1
rogk
Member
 
Registered: Feb 2004
Location: Finland
Distribution: Mandrake 10.0
Posts: 70

Rep: Reputation: 15
Changing the computer's name


Hi!
How could I change the computer's name using command line?
 
Old 06-24-2004, 02:47 AM   #2
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,053
Blog Entries: 2

Rep: Reputation: 47
Try these two things:

Code:
hostname <your hostname here>
If that works and you want it to be that from now own, try this:

Code:
echo hostname > /etc/hostname
That should work. You must do those as root also.

Hope that helps.

 
Old 06-24-2004, 01:59 PM   #3
rogk
Member
 
Registered: Feb 2004
Location: Finland
Distribution: Mandrake 10.0
Posts: 70

Original Poster
Rep: Reputation: 15
I installed Mandrake 10.0 to one of my computers and configured a working network. Then I shutdown the computer and took it off keyboard, mouse and display. Now I'm using the computer from other computers. That way I hope to learn to configure Linux and Linuxserver using command line. When I installed the Mandrake I named the computer and now I want to re-name it. With those two thinks you told me ,I didn't managed to get a new name to it, I think.
My IP don't show to outside world(internet). But when I use this apache-server at home. I could see those web-pages from apache, when I write the computers name to browser address line.
What about the line in httpd2.conf,"ServerName"? I have there #. What that line means?
Ps. Do you know very good www links, about the Linux commands.
 
Old 06-24-2004, 04:07 PM   #4
BIACS
Member
 
Registered: Apr 2004
Location: Arlington, TX
Distribution: Fedora Core 4 64bit
Posts: 95

Rep: Reputation: 15
You may like using the Mandrake server wizards. Go to drakconf (Configure Your Computer) and to Software Management (I think that is the title). Search for either wizard or drakwizard and install it. The next time you launch drakconf there will be a tab for Server Wizards, I haven't used them in version 10 yet but in previous versions they were really easy to use. You can setup any of the servers available there, Samba, Apache, DNS, SQL, etc. (provided their sources are installed also). If you want to cofigure it from another machine remotely, try installing webmin. From another machine you can use either the ip or name of your machine and port 10000 (you can change the port number). There are "wizards" available there also and with the Samba configuration in Webmin it is really easy to change the machine name and alias.
 
Old 06-24-2004, 09:45 PM   #5
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,053
Blog Entries: 2

Rep: Reputation: 47
There is a file that has to be changed to change the hostname in Mandrake, sorry, forgot about that little tidbit. I'm in Gentoo at the moment. I'll search around and see where that file is.

I think you have to change other files, like /etc/hosts, to make it broadcast to others the name. I'm not 100% sure on that though.

I'll be back.

 
Old 06-24-2004, 11:01 PM   #6
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,053
Blog Entries: 2

Rep: Reputation: 47
I found the 'official' hostname file. It is in the directories /etc/rc.d under file rc.sysinit. Open with Kwrite and go to about line 30. It should look something like this:

Code:
    HOSTNAME=smoker
Mine is named smoker. Just change to what you want it to be named.

As for the broadcast, you may want to check the file networks in /etc. I'm not real sure where it is. I haven't been down that road yet.

Hope that helps a bit.

Later

 
Old 06-25-2004, 08:21 AM   #7
rogk
Member
 
Registered: Feb 2004
Location: Finland
Distribution: Mandrake 10.0
Posts: 70

Original Poster
Rep: Reputation: 15
Thank you!

Thank you for your answer. I allready changed other computers hosts-files. Now I'll try to change the servername.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is your computer's name and why? MartinN General 409 01-18-2006 04:56 PM
Power up/down and your (computer's) health Peufelon Linux - Newbie 4 07-20-2005 05:20 PM
almost 100% of my computer's memory is taken up... why? ivj Linux - Software 1 05-19-2005 11:49 PM
How do I determine a computer's IP address? njschroe Linux - General 4 05-04-2005 05:53 AM
Computer's Architecture Slurpee Linux - Hardware 2 11-25-2004 01:43 PM


All times are GMT -5. The time now is 03:29 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration