old-www/LDP/solrhe/Securing-Optimizing-Linux-R.../chap4sec27.html

215 lines
3.4 KiB
HTML

<HTML
><HEAD
><TITLE
>some colors for a change</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK
REL="HOME"
TITLE="Securing and Optimizing Linux"
HREF="index.html"><LINK
REL="UP"
TITLE="Post-Install"
HREF="linpostinstall.html"><LINK
REL="PREVIOUS"
TITLE="Verify,Cross-check"
HREF="chap4sec26"><LINK
REL="NEXT"
TITLE="Update of the latest software"
HREF="chap4sec28.html"></HEAD
><BODY
CLASS="section"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Securing and Optimizing Linux: RedHat Edition -A Hands on Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="chap4sec26"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 4. Post-Install</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="chap4sec28.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="AEN3118"
>4.6. some colors for a change</A
></H1
><P
>&#13; Putting some colors on your terminal can help you to distinguish folders, files, archives, devices, symbolic links and executable file from others. My opinion is that colors help to make less errors and fast navigation on your
system. It's important to note that this hack is necessary only for Red Hat Linux version 6.1 (Cartman) and older, since the new Red Hat Linux version 6.2 (Zoot) now enables and includes this feature by default.
Edit the profile file vi <TT
CLASS="filename"
>/etc/profile</TT
> and add the following lines:
</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="programlisting"
>&#13; # Enable Colour ls
eval `dircolors /etc/DIR_COLORS -b`
export LS_OPTIONS='-s -F -T 0 --color=yes'
</PRE
></TD
></TR
></TABLE
>
Edit the <TT
CLASS="filename"
>bashrc</TT
> file <TT
CLASS="userinput"
><B
>vi /etc/bashrc</B
></TT
> and add the line:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="screen"
>&#13; <TT
CLASS="userinput"
><B
>alias ls='ls --color=auto' </B
></TT
>
</PRE
></TD
></TR
></TABLE
>
Then log in and out. The new <TT
CLASS="envar"
>COLORS</TT
>-environment variable should now be set, and your system will recognize that.
<DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
><SPAN
CLASS="inlinemediaobject"
><IMG
SRC="./images/Note.gif"
ALT="Note"
></IMG
></SPAN
>: </B
>
Remember that this feature is only required for Red Hat Linux version 6.1 and older.
</P
></BLOCKQUOTE
></DIV
>
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="chap4sec26"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="chap4sec28.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Verify,Cross-check</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="linpostinstall.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Update of the latest software</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>