LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to make the directories and files in color in the terminal (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-make-the-directories-and-files-in-color-in-the-terminal-423357/)

leonall 03-09-2006 09:01 PM

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 :)

btmiller 03-09-2006 09:13 PM

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.


All times are GMT -5. The time now is 06:41 PM.