LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-10-2004, 02:37 PM   #1
Quartzophobia
LQ Newbie
 
Registered: Jan 2004
Posts: 15

Rep: Reputation: 0
enabling colors in my shell?


how can i enable colors in the shell so i could see symbolic links in one color and directories in another and so on?
(both in "bash" and in "sh")
thx
 
Old 02-10-2004, 03:18 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Try 'man dircolors' - it's used for setting up environment variables to do directory coloring for ls. You may also need to use 'ls --color'. You can set it up in your ~/.bashrc, I think - edit that file and add the following lines:

eval `dircolors -b /etc/DIR_COLORS`
alias ls="ls --color=auto"
 
Old 01-02-2005, 05:54 AM   #3
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
I've added this line to my .bashrc file, but I have not noticed a change even after I have logged in and out. Do I have to restart something?
 
Old 01-02-2005, 06:05 AM   #4
ttolst
Member
 
Registered: Jan 2005
Location: Århus, Denmark
Distribution: Debian GNU/Linux
Posts: 34

Rep: Reputation: 15
alias ls 'ls --color' is enough if you just want the default colors.

try adding it to .bash_profile, that should be read during login
 
Old 01-02-2005, 06:56 AM   #5
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
Yup! This worked. Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'sh' shell - Actually calls legacy Bourne shell, or uses system default? Dtsazza Linux - Software 1 10-28-2005 09:20 AM
Fancy colors in shell... BaptismOfFire Debian 2 08-29-2004 12:02 PM
changing text colors in tcsh shell leontini Linux - General 1 08-17-2004 02:53 AM
Foolish Xlib colors and shell-launching Timer Programming 1 07-24-2004 03:43 PM
changing the shell font and colors Dodge This Linux - Software 3 08-10-2003 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration