Welcome to the most active Linux Forum on the web.
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 09-08-2005, 02:44 AM   #1
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, 03:03 AM   #2
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 :

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

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:

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

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


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
help! bash command prompt font/color change richiangpan9 Linux - Newbie 3 04-24-2005 12:34 PM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 08:14 PM
escape sequence for changing color of prompt killer_bunny Linux - General 1 02-10-2004 08:40 PM
How to recall an old command at the command prompt? J_Szucs Linux - Newbie 9 03-07-2003 01:29 AM
Prompt Color medamnit Linux - Newbie 4 05-06-2002 12:03 PM > Forums > Linux Forums > Linux - General

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