Terminal colors

April 22, 2008 at 4:24 pm Leave a comment

Default colors of files listed with ls command can be changed in /etc/DIR_COLORS file. For xterm the file is /etc/DIR_COLORS.xterm

Of course those values will be reflected globally. Each user can customize the colors individually by copying this file to .dir_colors in his home directory.

Example:
The folowing settings:

NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
LINK 00;36 # symbolic link
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 41;33;01 # symlink to nonexistent file

Result in the following output of ‘ls -l’ command:
Terminal colors before the change

And then we have decided that directories should be listed as green:

NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;32 # directory
LINK 00;36 # symbolic link
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 41;33;01 # symlink to nonexistent file

Result:
Terminal colors after change

Advertisements

Entry filed under: Linux. Tags: , .

Randy Pausch Copyrights

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

Categories


%d bloggers like this: