LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-09-2006, 09:01 PM   #1
leonall
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?

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

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 PM.

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