This is a follow-up to my previous post.
The ls command in Redhat Enterprise Linux (RHEL) by default uses the dark blue to show directories. This color is hard to see, especially on laptops with dim screens. I would like an easy way to change that.
The solution is similar to that in my previous post, but Redhat makes it a little easier. Here are the steps:
- Create a text file containing the color definitions by issue the following command: dircolors > ~/.dircolors
- Edit the file ~/.dircolors and change the colors to your taste
- Exit the shell and login again to see the changes
When a user logs in, RHEL executes the start-up files in the /etc/profile.d directory. Among those start-up files, colorls.sh (for borne-family shells) and colorls.csh (for csh-family shells) are responsible for setting the ls colors. The scripts look in the user’s home directory for a file called .dircolors to overwrite the colors. By creating and tweaking this file, the user can change the colors of the ls command to his or her taste. Personally, I prefer the bright yellow for directory: