By default linux server shell color are boring. Basically just using 1 color (white).  While white is okay for simple operations like installing packages, removing logs, etc...  White certainly does not help when listing directory contents.

Colorizing the content of directory really helps because it can distinguish different information using different colors, such as file vs directory. Even better showing full permission files and many more advantages.

Here is a simple instruction of how you can easily colorize your LS directory listing output for Linux (works with debian, ubuntu, centos, redhat, etc...)


In Linux edit /home/(user)/.bashrc

example:
nano /home/admin/.bashrc

Add or make sure the following lines are added:

export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'


If you like this article and like your new colorized directory listing, you may want to read my other article about using EXA (a modern replacement for LS - which uses colorized listing by default).

Post a Comment

Mới hơn Cũ hơn