Change directory color (ubuntu 12.04)

Hi

After much googling I'm still trying to figure out what I presume is a fairly easy task - I want to change directories in bash from blue (which can be pretty hard to read) to yellow globally, not on a per-user basis. The sites I've looked at can't even agree whether I should use /etc/dircolor or /etc/DIRCOLOR and give pretty diverse instructions.

As a newbie at the whole server thing I would guess this should be a single file edit somewhere? Any help would be greatly appreciated.

2 Replies

I haven't played around with changing the colors of folders and files, but have done so with the prompt.

I've used this site before: https://wiki.archlinux.org/index.php/ColorBashPrompt when working on my prompt formatting.

For folders, have a look for info on the ~/.dircolors folder and /usr/bin/dircolors executable.

My .bashrc has the color set using "–color=auto" for a few aliases. But I'm guessing there are other options.

Hope this helps a little.

Cheers,

Nap

Thanks for the reply. In the end I edited /home//.dircolors and edited the line DIR 01;33 # directory to a new color, then copied the .dircolors file into /etc/skel (and to all existing home directories) so that new users I create have the same change made. Not quite the way I wanted to fix it but the end result is the same so I guess that's a win.

At that point the link you provided was most helpful as it contains the necessary color codes.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct