LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 04-15-2007, 01:20 PM   #1
ben_weinberg
LQ Newbie
 
Registered: Apr 2007
Posts: 2

Rep: Reputation: 0
how to change the @localhost


This may be a silly question and excuse me if it is. I am new to linux.

How do i change what comes after the @ at the prompt

i.e currently its @localhost

How would i change that to what ever i wanted?

Thanks for any help in advance.

Ben
 
Old 04-15-2007, 01:25 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
As root from the console or xterm session type: hostname MyComputerNameHere

Logout and restart the GUI session or reboot, your choice.
 
Old 04-15-2007, 01:28 PM   #3
nmh+linuxquestions.o
Member
 
Registered: Feb 2007
Posts: 135

Rep: Reputation: 15
I am guessing that your hostname is "localhost".
I think you should be able to run:
Code:
$hostname
and find out if it is.

Assuming it is, and that it is a shell prompt (bash even), you can change the hostname for your computer, or just change the prompt.

For changing the hostname, I don't remember this that well, but you can try one or more of:
Code:
#hostname new name
maybe change the contents of /etc/hostname, or see this.

For changing the bash prompt, please see this article.
 
Old 04-15-2007, 01:56 PM   #4
mether
Member
 
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 30
If its Fedora or RHEL then make use of /etc/sysconfig/network to set the hostname permanent. Running hostname command will set the hostname but if will go away after a reboot.

Last edited by mether; 04-15-2007 at 01:58 PM.
 
Old 06-01-2007, 10:16 AM   #5
Grimmi-
Member
 
Registered: Oct 2005
Location: Finland
Distribution: Debian Lenny
Posts: 32

Rep: Reputation: 15
Quote:
Originally Posted by mether
If its Fedora or RHEL then make use of /etc/sysconfig/network to set the hostname permanent. Running hostname command will set the hostname but if will go away after a reboot.
Hmm, when I changed the /etc/sysconfig/network to look like this...
Code:
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=gurnarok.localdomain
It displays it correctly (grimmi@gurnarok), but when I try to play Ultima Online, I can't connect, it get's stuck at verifying account. When I change it back to localhost.localdomain, the game works again.

Any help?
 
Old 06-01-2007, 11:07 AM   #6
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 14, 15, RHL 5.2, Gentoo
Posts: 519

Rep: Reputation: 36
After you change your hostname it will be necessary to either restart your network or reboot your computer. As an analogy, you can think of it as someone else moving into your home or apartment and not wanting the previous tenants mail. Although the address is the same, the name is different. To restart your network you can use the GUI or the Command Line Interface(CLI).

Using the GUI follow the menu path System > Administration > Server Settings > Services. It will prompt you for the root password. Then it is a matter of finding the network service and clicking the restart button.

Using the CLI you would start up a terminal window and su to root. Then type the three words: service network restart at the prompt.

Using the hostname and domainname commands is only temporary name change. It is necessary to change the configuration file /etc/sysconfig/network to make it permanent. This can be accomplished using an editor or through the GUI. Follow the menu path System > Administration > Network and then choose the DNS tab, edit the hostname and save. Notice that when you save it will prompt you to restart the network.

Bill
 
  


Reply

Tags
localhost


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change localhost jdmml Fedora 10 07-02-2011 12:18 PM
Change mathieu@LOCALHOST (the localhost) frz Linux - Newbie 12 07-03-2006 09:04 PM
Change localhost name in username@localhost n175uj Linux - Newbie 4 07-01-2005 09:25 PM
change localhost w/o net legend1079 Red Hat 2 03-03-2004 02:30 PM
Localhost change ? mikeshn Linux - General 5 11-27-2002 03:30 PM


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

Main Menu
 
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
Open Source Consulting | Domain Registration