
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