[질문]alias 설정

김영재의 이미지

redhat 9랑 Wow Paran R2에서 공통적인 현상인데요...
root나 일반계정으로 로그인 해서 각각의 home directory의 .bashrc file에
alias c=clear
alias h=history
alias ls='ls -F'
alias ll='ls -al|more'
와 같이 설정하고 로그아웃 뒤 다시 로그인 했습니다.
그래서 터미널에서 알리아스를 테스트하면 제가 원하는 결과가 나옵니다만
X를 뛰운 뒤 ll명령을 실행하면 아무런 아웃풋도 나오지 않네요..
이거 왜 이런지 또 해결하려면 어떻게 해야하는지요?

무한포옹의 이미지

bash가 실행된 환경에 따라 .bashrc 를

실행하느냐 안 하느냐 하는 차이때문입니다.

 from 'man bash'
FILES
       /bin/bash
              The bash executable
       /etc/profile
              The systemwide initialization file, executed for login shells
       ~/.bash_profile
              The personal initialization file, executed for login shells
       ~/.bashrc
              The individual per-interactive-shell startup file
       ~/.bash_logout
              The individual login shell cleanup file, executed when a login shell exits
       ~/.inputrc
              Individual readline initialization file

간단하게 .bash_profile 에

if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

를 추가하세요.

$ man bash 강추!

-------------------------------
== warning 대부분 틀린 얘기입니다 warning ===

김영재의 이미지

.bash_profile file에 말씀하신 라인이 이미 설정되어 있는데요.
그런데도 안되네요...
뭐가 문제일런지요.....