LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-19-2014, 02:10 PM   #1
tecunuman
LQ Newbie
 
Registered: Apr 2014
Posts: 2

Rep: Reputation: Disabled
[root@localhost ~]#


How to change the localhost to user within linux
for example [root@user ~]#
have been trying to change it..
 
Old 04-19-2014, 02:24 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
You wouldn't. "localhost" is the name of the machine. Why would you have a machine called "user"??
 
Old 04-19-2014, 02:31 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
The user is root, so your prompt is already showing you
Code:
[user@nameofmachine]#
Changing that to
Code:
[user@user]#
Would be more than pointless
 
Old 04-19-2014, 02:36 PM   #4
aristocratic
Member
 
Registered: Sep 2011
Location: Texas
Distribution: Open SuSE 12.1, Lucid Puppy
Posts: 90

Rep: Reputation: Disabled
I changed the name of my machine by modifying the file:

/etc/hostname

I did it using the vi editor.
 
Old 04-19-2014, 02:39 PM   #5
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 194Reputation: 194
Heres a couple of links you might find useful:

https://wiki.archlinux.org/index.php/Color_Bash_Prompt

http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/


The second is rather lengthy but iirc it has an examples section.
 
  


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
Mail from root@localhost.localdomain thru relay=localhost.localdomain[216.24.138.1] rshartog Linux - Server 2 02-02-2009 11:35 PM
How to change root@127 to root@localhost? FirstBorn Linux - General 3 07-20-2008 01:15 PM
[root@localhost /]# maunishq General 15 01-19-2007 05:09 PM
root@localhost t0ker Linux - Newbie 4 09-14-2004 07:38 AM
Changing root@localhost to root@domain.com Stingreen Linux - General 14 12-17-2002 07:21 PM


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