Previous Next Contents

3. Do I have it at all?

First of all you need to know if you have a version of ls which knows how to colourize properly. Try this command in a Linux text console (although an xterm will do):

% ls ‐‐color

(the % is a shell prompt):

If you get an error message indicating that ls does not understand the option, you need to install a new version of the GNU fileutils package. If you do not have an appropriate upgrade package for your distribution, just get the latest version from your GNU mirror and install directly from source.

If you do not get an error message, you have a ls which understands the command. Unfortunately, some of the earlier versions included previously with Slackware (and possible others) were buggy. The ls included with Redhat 4.1 is version 3.13 which is okay.

% ls ‐‐version
ls - GNU fileutils-3.13

If you ran the ``ls ‐‐ color'' command on a Linux textbased console, the output should have been colourized according to the defaults on the system, and you can now decide whether there is anything you want to change.

If you ran it in an xterm, you may or you may not have seen any colour changes. As with ls itself, the original xterm-program did not have any support of colour for the programs running inside of it, but recent versions do. If your xterm doesn't support colours, you should get a new version as described at the end of this document. In the meantime just switch to textmode and continue from there.


Previous Next Contents