LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash diretory color (https://www.linuxquestions.org/questions/linux-newbie-8/bash-diretory-color-646952/)

raand 06-04-2008 08:37 AM

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.

Agrouf 06-04-2008 08:43 AM

Use the LS_COLORS environment variable
man dircolors

raand 06-04-2008 09:12 AM

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?

raand 06-04-2008 09:16 AM

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

Agrouf 06-04-2008 09:23 AM

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/

lostjohnny 06-04-2008 09:23 AM

I found this page on the subject. Any good?

http://linux-sxs.org/housekeeping/lscolors.html

raand 06-04-2008 09:28 AM

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.

pnsidhu 06-05-2008 04:32 AM

U can edit /ets/DIR_COLOURS accordingly


All times are GMT -5. The time now is 07:05 PM.