Linux >
Customize Linux directory colours by setting $LS_COLORS
This isn't particularly relevant any more, but I figured I'd make a page for this anyway. See shell-random and go hunting through my dotfiles for Dash, Bash and Zsh.
In your ~/.bashrc
, add:
\echo $LS_COLORS LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"
Cyan directories:
di=01;36 LS_COLORS="no=00:fi=00:di=01;36:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:"
Magenta symbolic links:
ln=01;35
A way to reset LS_COLORS:
\unset LS_COLORS \eval $( \dircolors -b ) \echo $LS_COLORS
Other stuff ∞
Also check out the dircolors
command. Try this:
\dircolors --print-database
Last updated 2020-07-05 at 10:08:09
[[ANSI]] and [[LS_COLORS]] are unfathomable right now because things aren't working as expected or documented. Maybe it'll all work out one day later.