HostOnNet Blog

Change ls color in bash CentOS/RHEL/Fedora

By default CentOS/RHEL show directorys in ls listing in dark green.

With dark color, i found it difficult to read directory names.

To change directory color, do

cp /etc/DIR_COLORS ~/.dir_colors

Edit ~/.dir_colors

vi ~/.dir_colors

Find

DIR 01;34     # directory

Replace with

DIR 01;33     # directory

Now log off and login (or run bash), you will see directory colors changed as follows.


Posted in Linux