我正在使用bash版本3.x运行El Capitan 10.11.3,因此我决定通过以下方式更新bash:
brew install bash
Brew将新的bash放在/ usr / local / Cellar / bash下:
brew info bash
bash: stable 4.3.42 (bottled), devel 4.4-beta, HEAD
Bourne-Again SHell, a UNIX command interpreter
https://www.gnu.org/software/bash/
/usr/local/Cellar/bash/4.3.42 (59 files, 7.3M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/bash.rb
==> Dependencies
Required: readline ✔
==> Caveats
In order to use this build of bash as your login shell,
it must be added to /etc/shells.
如您所见,brew提到我需要进行更新/etc/shells
才能使用新的bash。但是在关闭/重新打开当前shell之后,bash --version
告诉我现在我已经在使用4.3.42,所以我想知道在自动使用新版本的情况下发生了什么?
您如何关闭/重新打开当前shell?
—
user151019 '16
@Mark右键单击终端图标->退出,左键单击终端图标
—
Mike