Linux: color of files on ls command

Today, I just want to put basic information regarding Linux files and that is color coding of files when user runs ls command.
When you run ls command, you see executable files in different colors, image files in different colors and so does the directories. The color coding of different types of files is located in a configuration file /etc/DIR_COLORS for Linux. A side note: this is in my centOS server.
Colors on my CentOS server are as below

  • Executable files: Green
  • Directory: Blue
  • Image files(jpg, gif, bmp, png, tif): Magenta
  • Symbolic links: Cyan
  • Pipe: Yellow
  • Socket: Magenta
  • Orphaned symbolic links: Blinking Bold white with red background
  • Block device driver: Bold yellow foreground, with black background
  • Missing links along with files they point to: Blinking Bold white with red background
  • Archives or compressed files(like tar,gz,zip,rpm): Red

You can change them if you understand /etc/DIR_COLORS file. They are in the format of (file type attribute codes: text color codes:Background color codes)
File type attribute codes are as below:
00=none
01=bold
04=underscore
05=blink
07=reverse
08=concealed
Text color codes are as below:
30=black
31=red
32=green
33=yellow
34=blue
35=magenta
36=cyan
37=white
And finally, background color codes are:
40=black (default)
41=red
42=green
43=yellow
44=blue
45=magenta
46=cyan
47=white

The example definition for DIR file type which is of Bold Blue color, look for the entry: DIR 01;34
If you change the file than you have to logout and log back in to see the change.