Configure Mac Terminal to Have Color ls Output

This post will guide you how to configure mac terminal to have color ls output on Mac OS x system. How do I colorized output from the ls command on the Mac OS X system.

Configure Mac Terminal to Have Color ls Output


If you want the output of the ls command in Mac OS terminal, you just need to pass the -G option to the ls command. just type:

#ls -G

You can set one alias variable for ls command into .bashrc file, so just need to append the below lines into .bashrc:

alias ls='ls -G'
alias ll='ls -lG'

You can also try to edit the .bash_profile or .profile to export two variable. just add the below two lines into .profile file.

export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad

 

You might also like:

Sidebar



back to top