设置环境变量
bash_version=5.1.18
更新新系统并安装依赖
sudo yum -y update
sudo yum -y install curl
sudo yum -y groupinstall "Development Tools"
下载源码并编译安装
curl -O https://ftp.gnu.org/gnu/bash/bash-${bash_version}.tar.gz
tar xvf bash-${bash_version}.tar.gz
cd bash-${bash_version}
./configure
make
sudo make install
确认Bash的当前版本
bash --version
参考链接
[How To Install Bash 5.0 on CentOS 7](https://computingforgeeks.com/how-to-install-bash-5-on-centos-linux/)
评论区