Categorized | Bash, Linux

Tags : ,

How do I get ls to display in color

Posted on 28 September 2011

Login as root and add the –color option to the command.

ls -al –color /etc

Open the .bashrc file with your favorite text editor.
For example, you could type vi /root/.bashrc at the command line to open the file.

Under the line “# User specific aliases and functions” type:

alias ls=”ls -alh –color”
alias ll=”ls -alh –color”

Make sure to write your changes to the file and save them. The changes will not take effect until you close your terminal/session window and re-open a new terminal again.

 

This post was written by:

- who has written 11 posts on The Developer.

PHP / MYSQL developer

Contact the author

Comments are closed.