What does the different colours in Ubuntu mean? For example, when I type 'ls' in one of my folders, I get one of the files in light green, the other (which is a folder) in blue with green high lighting. What does those colours mean, and there is any manual about all the colours?
Blue color - Directory
Green color - Executable or recognized data file
Sky Blue Color - Linked file
yellow with black background - device
Pink colour - graphic image file
Red - Archive file
For your Information:
You can find out what colours
In addition, files are colourised by attributes:
all this information is contained in the output of
Here's a technical explanation of what's happening:
The colour code consists of three parts:
Each part can be omitted, assuming starting on the left. i.e. "01" means bold, "01;31" means bold and red. And you would get your terminal to print in colour by escaping the instruction with
Prints "Hello World" in bright red.
If you type
NORMAL 00 # global default, although everything should be something. FILE 00 # normal file DIR 01;34 # directory LINK 01;36 # symbolic link. (If you set this to 'target' instead of a # numerical value, the color is as for the file pointed to.) FIFO 40;33 # pipe SOCK 01;35 # socket DOOR 01;35 # door BLK 40;33;01 # block device driver CHR 40;33;01 # character device driver ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file SETUID 37;41 # file that is setuid (u+s) SETGID 30;43 # file that is setgid (g+s) STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable # archives or compressed (bright red) .tar 01;31 .tgz 01;31 # image formats .jpg 01;35 .jpeg 01;35 .gif 01;35 .bmp 01;35 # audio formats .aac 00;36 .flac 00;36 .ogg 00;36
If you want to play around with this here is an example on how to set a color for a file:
This will set
None of the answers here include the 256 color options in the latest versions of Ubuntu. I'm color deficient (some colors give me trouble near each other) so the default blue directory on black is real hard for me to read. What follows is my research to change that.
The default .bashrc should already be configured not only to take advantage of the system color code, but also one in ~/.dircolors so dump the dircolors output to .dircolor so you can start with that using this command.
Alternative: pick up a very similar 256 color dircolors from seebi's solarized project.
Grab this colortest script and run it with the command
So you have a color, now what. First we have to create the string.
The first number will be an attribute code, most likely 00, but if you want it to blink go with 05:
Next pick append
If you want to also put a background on it, pick another color (let's say 56) with the colortest script and the append
So now you have it, what do you do with it?
This won't apply immediately, you'll need to load the config. Use
You can do this same procedure with 16 colors. You don't need the special ;38;5 or ;48;5 stuff. Just toss the numbers into the string and enjoy the simplicity.