LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



Reply
 
Search this Thread
Old 02-01-2004, 03:43 PM   #1
blackbart
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
david_ross
Moderator
 
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 "127.0.0.1" in /etc/hosts then run:
hostname host.domain.com

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

Rep: Reputation: 149Reputation: 149
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.
 
  


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
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


All times are GMT -5. The time now is 12:58 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration