LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-14-2003, 03:33 PM   #1
emetib
Member
 
Registered: Feb 2003
Posts: 484

Rep: Reputation: 33
bash prompt colors


would anyone know how to change the PS1 prompt colors?

when i log into a server with ssh my prompt looks like this-
emetib@lsu emetib

it would be nice to make the switch on my box. i'm using libranet 2.8, so i'm basically using debain.

i've looked at my .bashrc, .bash_history, _profile, and even in the /etc/bash's. yet i can't find where to change them.

i've taken a look at the server that i log into also and i just can't find what i'm looking for.

cheers.

edit:

p.s. mine prompt now is just
chad@Hades ~/

i just want to change the colors.

Last edited by emetib; 06-14-2003 at 03:34 PM.
 
Old 06-14-2003, 05:01 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
if you wanna make the changes for a regular user, you make the changes in the file /home/user/.bashrc and for the root you make the changes in the file /root/.bashrc..

color code for red = 0;31
color code for blue = 0;34

i would tell you the whole command is but i don't know what emetib or lsu is so i can't give the proper commands.
but if i had to guess this is what you have there:
\u = the username of current user
\h = hostname
\W = basename of current directory
and if that is the case you would insert this command:
PS1="\[\033[0;31m\][\u@\h\[\033[0m\] \[\033[0;34m\]\W \[\033[0m\]"

just give that a try by inserting it in the .bashrc file and see if thats what you want..
 
Old 06-14-2003, 05:11 PM   #3
emetib
Member
 
Registered: Feb 2003
Posts: 484

Original Poster
Rep: Reputation: 33
yep that works.

now i just have to play with the colors some.

thank you.
 
Old 06-14-2003, 05:35 PM   #4
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
np d00d
 
  


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
changing prompt colors? microsoft/linux Debian 2 05-29-2005 04:22 PM
tcsh prompt with colors TroelsSmit Linux - Newbie 2 12-20-2004 07:55 AM
Bash colors ryedunn Mandriva 0 12-09-2004 08:50 AM
bash colors, wan't white, not gray king8 Red Hat 2 10-12-2003 11:27 PM
Questions about bash colors.... jcornel7 Linux - Newbie 7 02-05-2003 02:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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