Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-09-2006, 09:01 PM   #1
LQ Newbie
Registered: Feb 2006
Posts: 3

Rep: Reputation: 0
How to make the directories and files in color in the terminal

Hi all,

When we login as root, and type the "ls" command, we will see the directories and files in color (green, blue, etc).
If a normal user want to have that type of feature, anyone knows how to do it?

Old 03-09-2006, 09:13 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
ls --color

Make an alias, e.g. alias ls="ls --color" to make it behave that way every time you use ls.

You can add the alias in your bash startup file (.bash_profile for login shells, .bashrc for non-login shells -- usually I just have .bash_profile source .bashrc so I get the same environment in both cases). This will make it so you don't have to set the alias each time you open a new shell.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Terminal background color not working mijohnst Linux - Newbie 2 10-03-2005 04:11 PM
Color depth of remote terminal BrainScanning Linux - Networking 2 09-13-2005 11:10 PM
Turning off terminal color highlight penguinco Fedora 1 12-08-2004 11:25 AM
Terminal font and color berkay Linux - Newbie 10 09-23-2004 02:19 AM
get terminal color? cratos Programming 0 07-16-2003 03:04 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:47 AM.

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