Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-31-2003, 02:04 AM   #1
LQ Newbie
Registered: Jul 2003
Posts: 8

Rep: Reputation: 0
change hostname

RedHat AS 2.1->
How to change hostname from "localhost" to anything I want?
Old 07-31-2003, 02:26 AM   #2
LQ Newbie
Registered: Jul 2003
Location: Sweden
Distribution: Slackware
Posts: 19

Rep: Reputation: 0
Just hit netconfig/netcfg in a console. Follow the network config program and the reboot.

Old 07-31-2003, 02:28 AM   #3
Senior Member
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
If it's the same as the normal "desktop" RH's, if you're Gnome or Kde you can change it from the menu item "network" or in a shell as root type "neat" or at the shell type "hostname <mynewhostname>" (although this method doesn't seem to stick for me) or edit the file "/etc/sysconfig/network" and change it in their.

Don't remove any references to localhost know in the "/etc/hosts" though unless ya want grief.
Old 07-31-2003, 02:30 AM   #4
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
To set the hostname in RedHat,
you must edit the line HOSTNAME= in /etc/sysconfig/network

i got the above from a previous post asking the same question. i just check and i have that file and it has 2 lines:



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
How to change hostname blackbart Linux - Newbie 2 02-01-2004 03:56 PM
change hostname kafnir Linux - Networking 1 10-21-2002 12:10 PM > Forums > Linux Forums > Linux - Networking

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