LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux colors (https://www.linuxquestions.org/questions/linux-newbie-8/linux-colors-167827/)

surban99 04-08-2004 01:33 PM

linux colors
 
my friends linux is all pretty, when he types ls he gets a color listing, i have to type ls --color even when i use ls --color=always i still only get color results once. apparently he's to 1337 to tell me

AutOPSY 04-08-2004 01:47 PM

your shell has a variable called LS_COLORS,
type
'env'

to see if you have it set.


ex.
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01
:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00
;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*
.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:
*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:
*.xpm=00;35:*.png=00;35:*.tif=00;35:

schurt 04-08-2004 01:56 PM

just make an alias in your bashrc file

surban99 04-08-2004 02:08 PM

ok heres what i get

PWD=/
PS1=\h:\w\$
USER=root
MAIL=/var/mail/root
SSH_CLIENT=192.168.0.2 3955 22
LOGNAME=root
SHLVL=1
SHELL=/bin/bash
HOME=/root
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
SSH_TTY=/dev/pts/0
_=/usr/bin/env
OLDPWD=/root

now how do i edit it?

schurt 04-08-2004 02:16 PM

think at the bottom of that file put

alias ls "ls --color"

SciYro 04-08-2004 02:18 PM

Code:

alias ls=ls --color=always

surban99 04-08-2004 02:21 PM

is that just a text file i can edit?

AutOPSY 04-08-2004 02:27 PM

yes, assuming you are using the bourne again shell (bash) this file would be .bash_profile
.login or .bashrc .

found by typing ls -al in your home directory.

add what the other posters had said to this file. and relogin.

surban99 04-08-2004 02:35 PM

Cool, thanks guys it was the .bashrc file in the root and all the color coding was just commented out


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