Bala's Blog

Colorize shell in FreeBSD

August 14 2018
65 words, ~1 min. read
freebsd,  shell 

I wanted to colorize display (e.g. directories and links in different colors) in FreeBSD shells, similar to Linux. In the case of Linux, ls was aliased to ls --color=tty. However, similar alias did not work in FreeBSD.

After going through the man page of ls (LSCOLORS section within the man age), I got expected output by setting the following environment variables,

export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagaced