# prerequisite: gcc
# installation steps
# download
curl https://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz -o ~/Downloads/bash42.gz
tar xzf ~/Downloads/bash42.gz
# using make to compile
cd ~/Downloads/bashr42
./configure && make && sudo make install
# using new shell
chsh -s /usr/local/bin/bash {user_name}
sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells"
# replace the old shell with the new one
sudo mv /bin/bash /bin/bash3.2.58
sudo ln -s /usr/local/bin/bash /bin/bash
本文详细介绍了如何使用curl下载并安装bash shell,通过make进行编译,更改默认shell为新版本bash,并替换旧版shell文件,确保系统稳定运行。
1883

被折叠的 条评论
为什么被折叠?



