Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-23-2002, 08:49 AM   #1
Registered: Feb 2002
Posts: 586

Rep: Reputation: 30
Localhost change ?

How I can change the localhost [mike@localhost mike]$ to something else.

I remember I did before but forget . How that can be done globally and constantly, so I don't need to change it every time.

Old 11-23-2002, 09:21 AM   #2
Senior Member
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
look at the file /etc/hosts

and change both instances of localhost. Some apps rely on the hostname localhost, but this should work localhost.localdomain bongothewhhippet

because bongothewhippet is an alias here for locahost.
Old 11-24-2002, 02:57 PM   #3
LQ Newbie
Registered: Jun 2002
Location: Maryland
Distribution: Redhat 7.2
Posts: 8

Rep: Reputation: 0
#hostname newhostname
Old 11-26-2002, 06:06 AM   #4
LQ Newbie
Registered: Jun 2002
Location: Malaysia
Posts: 14

Rep: Reputation: 0
type at
change host name
Old 11-26-2002, 07:18 PM   #5
Registered: Oct 2002
Distribution: RH 8.0 and fluxbox
Posts: 122

Rep: Reputation: 15
is there any symbols that can't be included in a hostname? Right now I have one that includes a _ and a ?. Linux runs fine, but when booting up LPD says something about an invalid hostname.
Old 11-27-2002, 02:30 PM   #6
Registered: Sep 2002
Location: somewhere
Distribution: gentoo
Posts: 123

Rep: Reputation: 15

I know its an old RFC, but AFAIK its still what the root level servers are going by, therefor so are we...

RFC 952 defines the vaild characters that a hostname can have. the imporant text goes something like:


1. A "name" (Net, Host, Gateway, or Domain name) is a text string up
to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
sign (-), and period (.). Note that periods are only allowed when
they serve to delimit components of "domain style names". (See
RFC-921, "Domain Name System Implementation Schedule", for
background). No blank or space characters are permitted as part of a
name. No distinction is made between upper and lower case. The first
character must be an alpha character. ......

Windows XP AFAIK will let you use stuff like "_" and "?" without complaining. Typical of M$.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change localhost jdmml Fedora 10 07-02-2011 11:18 AM
Change localhost name in username@localhost n175uj Linux - Newbie 4 07-01-2005 08:25 PM
change localhost w/o net legend1079 Red Hat 2 03-03-2004 01:30 PM
How to change localhost.localdomain learn25 Red Hat 1 02-24-2004 07:32 AM
how to change rh 9 box from localhost to something else izibo Linux - Networking 5 07-20-2003 07:01 PM > Forums > Linux Forums > Linux - General

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