
MacOS에서는 다음을 설치했습니다 bash
.
brew install bash
그것이 만들어낸/usr/local/Cellar/bash/5.0.18/bin/bash
이 명령은 which -a bash
보고만 합니다 /bin/bash
. 터미널을 닫고 다시 시작하면 동일한 출력이 표시됩니다.
새 bash를 추가한 /etc/private/shells
다음 기본 셸을 새 버전으로 변경했습니다 bash
.
sudo vim /private/etc/shells # added new bash 5.0.18 path
chsh -s /usr/local/Cellar/bash/5.0.18/bin/bash
그런 다음 재부팅했지만 여전히 다음이 표시됩니다.
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.
뭐가 문제 야?
답변1
brew
추가하려는 항목이 bash
되도록 설치하세요 . 그렇지 않으면 업데이트될 때 마다 업데이트 해야 합니다 ./usr/local/bin
$PATH
$PATH
bash
bash를 로그인 쉘로 설정하시겠습니까? 그 다음에:
chsh -s /usr/local/bin/bash