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
|
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: |
just make an alias in your bashrc file
|
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? |
think at the bottom of that file put
alias ls "ls --color" |
Code:
alias ls=ls --color=always |
is that just a text file i can edit?
|
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. |
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. |