Use Shell Environment Variable LS_COLORS to Change Directory Listing Colors of ls –color

After you have enabled the color switch of ls command in shell console, it’s nice but some may complain that the deep blue color of the directories are too dark to recognize sometimes. Let’s change that.

Just open up the .profile or .bash_profile file under your home directory and put this line in it:

export LS_COLORS='di=01;34'

Done! Now the color of the ls directory listings is much lighter and easier to recognize. There’s also a tip of how to change the default dark color for comments in vi text editor.

4 thoughts on “Use Shell Environment Variable LS_COLORS to Change Directory Listing Colors of ls –color

  1. Pingback: Colorful ls, SSH Console and Command Prompt

  2. Hey just thought i would say something.. This is the third time that I’ve visited your blog in the last 3 months searching for totally unrelated things. Spooky or what?

  3. Thank you! I thought I was going to go blind with that directory blue. This is much better.

  4. Pingback: vi code highlighting: change the default comments color from dark blue to light blue | Asher's space

Comments are closed.