First change ls commands color attribute to auto

alias ls=’ls –color=auto’

then add this to /$HOME/.bashrc

then create a file /$HOME/.dircolors

extract this to that file (which must be one line after export command there is a space)

export LS_COLORS=”no=00:fi=00:di=01;35:ln=01;36:pi=40;33:so=01;35:do=01;35:

bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:

tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:

*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:

*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:

*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:

*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:

*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:

*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mng=01;35:*.pcx=01;35:

*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:

*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:

*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:

*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:

*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:”

Some definitions for abbreviations

di = directory
fi = file
ln = symbolic link
pi = fifo file
so = socket file
bd = block (buffered) special file
cd = character (unbuffered) special file
or = symbolic link pointing to a non-existent file (orphan)
mi = non-existent file pointed to by a symbolic link (visible when you type ls -l)
ex = file which is executable (ie. has ‘x’ set in permissions).

and colors

0 = default colour
1 = bold
4 = underlined
5 = flashing text
7 = reverse field
31 = red
32 = green
33 = orange
34 = blue
35 = purple
36 = cyan
37 = grey
40 = black background
41 = red background
42 = green background
43 = orange background
44 = blue background
45 = purple background
46 = cyan background
47 = grey background
90 = dark grey
91 = light red
92 = light green
93 = yellow
94 = light blue
95 = light purple
96 = turquoise
100 = dark grey background
101 = light red background
102 = light green background
103 = yellow background
104 = light blue background
105 = light purple background
106 = turquoise background

then add

source /root/.dircolors

command to /$HOME/.bashrc file.

then you can change /$HOME/.bashrc file whatever color you want.

Buy me a beer

Related posts:

  1. linux watch command & example usage you can use watch command directly like this watch...
  2. MBR backup with dd command @ LINUX MBR is the master boot record of your disks....
  3. Backup entire disk (mbr included) with dd (linux command) and gzip BACKUP DISK dd if=/dev/sdX | gzip > a.gz RESTORE...
  4. Frame Buffer Setup (Enable Linux Frame Buffer) change this line /vmlinuz-2.6.9-22.EL ro root=LABEL=/1 rhgb quiet in...
  5. Configuring CVS and CVSUP on Linux Installation of CVS and CVSUP Installing CVS on Redhat...