Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I execute command


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
up vote 14 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


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.