How-to make file have different color when doing ls?
24,143
Solution 1
You can edit ~/.dircolors
, if it doesn't exist you can create it with:
dircolors -p > ~/.dir_colors
As the example here shows, you can have this in your .bashrc:
eval `dircolors ~/.dir_colors`
alias ls="ls --color=auto"
Solution 2
one doesn't need to add anything to the /home/yourusername/.bashrc file since it already contains the nessecary entries
just search for --color and uncomment them so they are active!
Related videos on Youtube
Author by
UAdapter
Updated on September 18, 2022Comments
-
UAdapter over 1 year
When I execute command
ls
it displays files and folders. folders are typed in light blue. I would like to have xml files types in pink color.
How to do it?