Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-01-2004, 03:43 PM   #1
LQ Newbie
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
How to change hostname

Hello - First time post & a big newbie who wants to move to Linux full time.

I recently installed mandrake 9.2. I now want to change the hostname. How do I change it? I went to the the man page for hostname. It looks like all I do is use set name. Is that all there is to a host name change? I'm a little nervous about changing my hostname as my installation is working great and I don't want to mess things up. Any help is appreciated.
Old 02-01-2004, 03:54 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Welcome to LQ.

Make sure your new hostname is next to the loopback address "" in /etc/hosts then run:

You can change the value in:
This will keep the change after a reboot.
Old 02-01-2004, 03:56 PM   #3
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,683

Rep: Reputation: 219Reputation: 219Reputation: 219
It's just that simple. Just run
hostname newhostname
Hostname change is usually very safe (especially if it's your home machine). You can always change it back.


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
How do you change your Hostname? JGplt3095 Linux - Newbie 2 09-28-2005 03:02 PM
How do you change your hostname? Thaidog Linux - Newbie 6 07-24-2005 09:52 PM
Change hostname garlam Slackware 2 10-13-2004 03:19 AM
change hostname dincer80 Linux - Networking 3 07-31-2003 02:30 AM
change hostname kafnir Linux - Networking 1 10-21-2002 12:10 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:03 PM.

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