[질문]리눅스 자체에서 ls 쓸때 색깔이 안 나와요

익명 사용자의 이미지

저는 진짜 초보입니다. 그전에는 파일과 디렉토리가 색깔 구분이 되어서
보였었는데 재부팅 한 후에 그 구분이 없어져 버렸습니다.
어디 설정을 다시 해야 할것 같은데 어떻게 해야 하는지 모르겠어요
고수 분들 부탁합니다.

익명 사용자의 이미지

설치본 버젼이 없군요... --;

먼저

# vi /etc/profile

하셔서

for i in /etc/profile.d/*.sh ; do
if [ -x $i ]; then
. $i
fi
done

이 부분이 있는지 확인 하시고(없다면 넣으시고...)

# ls /etc/profile.d

하셔서 colorls.sh, colorls.csh 파일이 있는지
확인하세요. 없다면...

--------- colorls.sh -----------------
# color-ls initialization
COLORS=/etc/DIR_COLORS
eval `dircolors --sh /etc/DIR_COLORS`
[ -f "$HOME/.dircolors" ] && eval `dircolors --sh $HOME/.dircolors` && COLORS=$HOME/.dircolors

if echo $SHELL |grep bash 2>&1 >/dev/null; then # aliases are bash only
if ! egrep -qi "^COLOR.*none" $COLORS &>/dev/null; then
alias ll='ls -l --color=tty'
alias l.='ls -d .[a-zA-Z]* --color=tty'
alias ls='ls --color=tty'
else
alias ll='ls -l'
alias l.='ls -d .[a-zA-Z]*'
fi
fi

-------------------------------------------------------

---------- colorls.csh ---------------------
# color-ls initialization
set COLORS=/etc/DIR_COLORS
eval `dircolors -c /etc/DIR_COLORS`
test -f ~/.dircolors && eval `dircolors -c ~/.dircolors` && set COLORS=~/.dircolors

egrep -qi "^COLOR.*none" $COLORS

if ( $? != 0 ) then
alias ll 'ls -l --color=tty'
alias l. 'ls -d .[a-zA-Z]* --color=tty'
alias ls 'ls --color=tty'
else
alias ll 'ls -l'
alias l. 'ls -d .[a-zA-Z]*'
endif
-------------------------------------------------------

이렇게 작성 후에 reboot을 시키세요.