LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 06-04-2008, 08:37 AM   #1
raand
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Rep: Reputation: 0
bash diretory color


This is not a really huge question I am just annoyed by the dark blue directory color in my bash shell and want to change it. I use a black background so it is dificult to read the blue. Is this possible? and if it is how do I do it?

Thanks in advance.
 
Old 06-04-2008, 08:43 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
Use the LS_COLORS environment variable
man dircolors
 
Old 06-04-2008, 09:12 AM   #3
raand
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
sorry you lost me a little in that, still fairly new to linux and not really sure what you mean. could you explain a little more?
 
Old 06-04-2008, 09:16 AM   #4
raand
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
I looked in my linux in a nutshell book and found the command dircolors, but what do i put in the file it talks about? and if i make a file called newDirColors do i just run the command like so:

%dircolors newDirColors
 
Old 06-04-2008, 09:23 AM   #5
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
OK, bash doesn't paint your directories in colors. It's the ls command that paints them.
The ls command uses some terminal codes to tell it to display the directory in blue.
The terminal codes are taken from the LS_COLORS environment variable.
try echo $LS_COLORS and you will see what I mean.
in LS_COLORS, there is a 'di=something', di is for directories and something is the code for your terminal to print in blue. The TERM environment variable tells you which terminal you are using.
Here are the codes for the xterm compatible terminals:
http://www.frexx.de/xterm-256-notes/
 
Old 06-04-2008, 09:23 AM   #6
lostjohnny
Member
 
Registered: May 2006
Distribution: Fedora Core 6
Posts: 37

Rep: Reputation: 15
I found this page on the subject. Any good?

http://linux-sxs.org/housekeeping/lscolors.html
 
Old 06-04-2008, 09:28 AM   #7
raand
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you,

I also found
http://linux-sxs.org/housekeeping/lscolors.html

at this link there is a good explanation on how to do it in your .bashrc file.

Thanks again guys for some reason I just could not figure this one out.
 
Old 06-05-2008, 04:32 AM   #8
pnsidhu
LQ Newbie
 
Registered: May 2008
Posts: 4

Rep: Reputation: 0
U can edit /ets/DIR_COLOURS accordingly
 
  


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
Bash color shell L0CTiT3 *BSD 5 10-22-2008 10:59 AM
[bash] changing the color set MD3 Linux - Software 2 04-27-2005 12:38 PM
bash ls --color alias? tripmix Linux - Newbie 7 01-18-2005 04:49 AM
how to setup ftp user's diretory as /var/www/html lzyking Linux - Software 4 02-25-2003 12:58 PM
Cant set color or promt in bash outsider Linux - General 2 10-15-2001 12:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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