LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 11-08-2005, 05:29 PM   #1
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Rep: Reputation: 30
Changing from localhost?


I know this might seem like a pretty newb-ish question but how do I change my hostname permanently, I know how to change it temporarily with the hostname command, but I want it to stay that name even when I reboot.

Any help?
 
Old 11-08-2005, 05:59 PM   #2
mebrelith
Member
 
Registered: Nov 2004
Location: Torreón, Coahuila, México
Distribution: Gentoo
Posts: 342
Blog Entries: 1

Rep: Reputation: 30
Edit /etc/hosts.

Copy the line that says
Code:
127.0.0.1               localhost.localdomain localhost
immediately below and change the last localhost for whatever you want to name your computer. At the end you should have something like this:
Code:
127.0.0.1               localhost.localdomain localhost
127.0.0.1               localhost.localdomain MyLinuxBox
where MyLinuxBox can be whatever you choose.

Then edit /etc/sysconfig/network, comment out the HOSTNAME line and type a new
Code:
HOSTNAME=MyLinuxBox
where MyLinuxBox is whatever you typed in /etc/hosts. At the end it should look something like this:
Code:
NETWORKING=yes
#HOSTNAME=localhost.localdomain
HOSTNAME=MyLinuxBox
Reboot your box
Good luck

Last edited by mebrelith; 11-08-2005 at 06:01 PM.
 
Old 11-08-2005, 07:43 PM   #3
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Original Poster
Rep: Reputation: 30
Excellent!

I knew the network file was there, but didn't know to edit the hosts file.

Thank you.
 
Old 11-08-2005, 07:52 PM   #4
mebrelith
Member
 
Registered: Nov 2004
Location: Torreón, Coahuila, México
Distribution: Gentoo
Posts: 342
Blog Entries: 1

Rep: Reputation: 30
No problema. Thats what we are here for.
 
  


Reply



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
Changing localhost name aje Linux - General 1 11-11-2004 10:23 PM
Changing name from localhost jbraum Mandriva 9 01-17-2004 01:04 AM
changing Localhost.localdomain Brother Michael Linux - Newbie 6 08-18-2003 09:01 PM
Changing localhost@localdomain??? TMMO Linux - Networking 2 08-10-2003 11:52 PM
changing localhost endfx Linux - Software 6 05-15-2003 05:27 PM

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

All times are GMT -5. The time now is 01:06 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