Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 9 down vote accepted

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"
share|improve this answer

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.