[ Linux ][ Ubuntu ] apt-get install 하고 탭 키로 원하는 목록이 안 나올 경우 해결 방법 | apt-get install tab
[ Linux ][ Ubuntu ] apt-get install 하고 탭 키로 원하는 목록이 안 나올 경우 해결 방법
apt-get install libsdl 까지 입력 하고 tab key를 두번 클릭 하면
이것 처럼 설치 할 수 있는 패키지 리스트가 나와야 하는데 안 나온다.
해결 방법 )
1. vi ~/.bashrc
.bashrc 파일을 열어서
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
#fi
위와 같은 라인에서
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
을 주석 해제 하고 다시 로그인 하거나
source ~/.bashrc
을 실행 하고
다시 시도해 보면 제대로 목록이 나오는 것을 확인 할 수 있다.
2. bash-completion 설치
apt-get install bash-completion
으로 패키지를 설치 하고
vi ~/.bashrc
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
을 적용 하고
source ~/.bashrc ( 혹은 . ~/.bashrc )
을 적용 하면 됩니다.