(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Articles, Tips, How-To's

Best of CUSM: Linux colors


What is this stuff?
If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):

Personally, I don't like colors in my shell. I think it would be fine as an option, but to have it as the default offends me and many other old Unix hands.

You can shut off command line colorizing by editing /etc/DIR_COLORS and changing "COLOR tty" to "COLOR none" or (less drastically) by removing the "TERM ansi" line from the same file (which removes colorization for ansi but doesn't affect console use).

The shell DEFINITELY shouldn't be attempting colors when the TERM is not "linux". This just makes things worse.

If you hate vi colorization, see Controlling Linux colors in vi (vim)




From - Thu May  4 17:54:32 2000
Path: news.randori.com!korova.insync.net!feed1.news.rcn.net!rcn!newsfeed.
cwix.com!cyclone.southeast.rr.com!typhoon.southeast.rr.com.POSTED!not-for-mail
From: hlawson@triad.rr.com (Hugh Lawson)
Newsgroups: comp.os.linux.misc,linux.redhat.misc,comp.unix.misc
Subject: Re: ls --color command
References: 
<3911C3F3.F6758905@merlinsoftech.com> 
Reply-To: hlawson@triad.rr.com
Message-Id: <slrn8h3jh7.ov.hlawson@localhost.localdomain>
User-Agent: slrn/0.9.5.7 (UNIX)
Lines: 34
Date: Thu, 04 May 2000 19:14:23 GMT
NNTP-Posting-Host: 24.28.230.94
X-Complaints-To: abuse@rr.com
X-Trace: typhoon.southeast.rr.com 957467663 24.28.230.94 (Thu, 04 May 
2000 15:14:23 EDT)
NNTP-Posting-Date: Thu, 04 May 2000 15:14:23 EDT
Organization: RoadRunner - Triad
Xref: news.randori.com comp.os.linux.misc:204486 linux.redhat.misc:2375735 
comp.unix.misc:13329
X-Mozilla-Status: 8010
X-Mozilla-Status2: 00000000

On Thu, 04 May 2000 14:39:47 -0400, C.E.G. <crystal@merlinsoftech.com> 
wrote:
>below is an excerpt from the "ls" man page in regards to the "--color"
>option
>
>when I use this option there *are* colors.  the problem is that they
>are horribly
>eye offending colors.  does anyone know what file I can change in
>order to set
>the defaults of these colors to a more pleasing combination?

Two lines from my ~/.bashrc



eval `dircolors ~/.dir_colors`
alias ls="ls --color=auto"

The command 'dircolors' takes its data from the file ~/.dir_colors and
creates an environment variable LS_COLORS.  The command 'ls --color' takes
its colors from the environmental variable LS_COLORS.

So, write a suitable ~/.dir_colors file, and execute the command
'dircolors'.  To get a starting file for editing, do this:

dircolors -p > ~/.dir_colors

The ~/.dir_colors file so created includes directions on coding the colors
for different kinds of files.

See man dircolors.



-- 
Hugh Lawson
Greensboro, North Carolina
hlawson@triad.rr.com

See also Linux colors




Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar


ad


/Bofcusm/345.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - Linux
       - Bofcusm


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress