Register a domain and help support LQ
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, 02: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, 02:54 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
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, 02:56 PM   #3
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,545

Rep: Reputation: 160Reputation: 160
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 02:02 PM
How do you change your hostname? Thaidog Linux - Newbie 6 07-24-2005 08:52 PM
Change hostname garlam Slackware 2 10-13-2004 02:19 AM
change hostname dincer80 Linux - Networking 3 07-31-2003 01:30 AM
change hostname kafnir Linux - Networking 1 10-21-2002 11:10 AM

All times are GMT -5. The time now is 09:56 AM.

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