Today, I Learned...

by Justin Campbell

< All

ls supports color coding your files/directories/symlinks. Set the CLICOLOR environment variable to enable:

ls screenshot

You can customize the color by setting the LSCOLORS environment variable:

ls color screenshot

(On non-BSD Bash, the environment variable is LS_COLORS, and has a different syntax)

You can search for lscolors to find color schemes, or use an LSCOLORS Generator.

Store your preferred settings in your profile:

export CLICOLOR=true
export LSCOLORS=Gxfxcxdxbxegedabagacad

Learned while pairing with @jearvon.

October 10th, 2014