LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-22-2004, 05:41 PM   #1
Arodef
Member
 
Registered: Apr 2004
Distribution: Centos, Fedora
Posts: 125

Rep: Reputation: 17
How to change prompt hostname "localhost"?


My command prompt looks like the following:

[myname@localhost myname]


I thought localhost was set from the DHCP hostname set in network config. However changing that doesn't change the prompt. Where is that value set and how do I change it? Thanks!
 
Old 06-22-2004, 06:58 PM   #2
flyfishin
Member
 
Registered: Aug 2003
Location: KC, MO
Distribution: CentOS, RHEL, SuSE, Fedora
Posts: 243

Rep: Reputation: 30
You can use the system-config-network utility to set the hostname. Click the DNS tab once the config-network utility is started and you'll see the box to set hostname. That will set the hostname in the /etc/sysconfig/network file by adding the line

HOSTNAME=yourhostname
 
Old 06-24-2004, 07:17 AM   #3
flyfishin
Member
 
Registered: Aug 2003
Location: KC, MO
Distribution: CentOS, RHEL, SuSE, Fedora
Posts: 243

Rep: Reputation: 30
Here is one "gotcha" when using the system-config-network gui. I used it to simply change the hostname of my machine. I changed nothing else but the hostname. When I saved the information the following was added to the configuration file for all network devices on my system:

PEERDNS=no

What that does is prevent your /etc/resolv.conf file from being overwritten. That prevents name resolution from working!!! So if you have your devices setup to use DHCP and you are expecting your dns servers to be updated make sure you either remove that PEERDNS line or change it to

PEERDNS=yes
 
Old 08-02-2004, 06:45 AM   #4
clutch
LQ Newbie
 
Registered: Jul 2004
Posts: 2

Rep: Reputation: 0
hmm ok..now i know...by the way where is it in the command shell....
 
  


Reply



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
Fedora Core 2: Screen Resolution can not change from "800X600" to "1024X 768" suhaimi_sj Fedora - Installation 18 12-17-2009 03:29 AM
how do i change the name of my computer from "localhost" poiuytrewq Linux - Newbie 3 04-17-2005 05:57 AM
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 04:42 PM
How do I change name from "LocalHost"? jsin Linux - Newbie 3 10-29-2003 12:02 PM
/var/log/messages contains "localhost" instead of the real hostname allel Linux - Networking 0 07-15-2002 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 08:41 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
Open Source Consulting | Domain Registration