LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-08-2005, 01:44 AM   #1
init_linux
LQ Newbie
 
Registered: Sep 2005
Posts: 13

Rep: Reputation: 0
Command Prompt Color


Hello everybody,

I am using Fedora Core 3 and I want to change the color of my prompt, so that for root, I'll have one color and for non-root users, I can have different color.

Can anyone provide me a way to perform this.
 
Old 09-08-2005, 02:03 AM   #2
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 33
Yep. Just creat a .bachrc file in root's home directory and your home directory with different prompt instructions.

In my home I have :

Code:
 PS1='[\e[31m\u\e[0m:\w]: '
And root has:

Code:
export PS1='|\e[32m\e[1m\u\e[0m:\w|:'
My user name is red and root's name is green.


Go here for how to set up the PS1:

http://www.pantz.org/scripting/shell/colorterm.shtml

Have fun!
 
Old 09-08-2005, 02:20 AM   #3
init_linux
LQ Newbie
 
Registered: Sep 2005
Posts: 13

Original Poster
Rep: Reputation: 0
Thank you Optimistic...It worked.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
help! bash command prompt font/color change richiangpan9 Linux - Newbie 3 04-24-2005 11:34 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM
escape sequence for changing color of prompt killer_bunny Linux - General 1 02-10-2004 07:40 PM
How to recall an old command at the command prompt? J_Szucs Linux - Newbie 9 03-07-2003 12:29 AM
Prompt Color medamnit Linux - Newbie 4 05-06-2002 11:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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