文章目录
1、实验环境查看bash版本:
2、下载安装包3、安装bash5.04、查看安装后版本信息
1、实验环境
环境版本
Linux版本CentOS7 x86_64bash版本4.2
查看bash版本:
[root@izbp1728di5ng6k1mlmgx9z ~
]
GNU bash, version 4.2.46
(2
)-release
(x86_64-redhat-linux-gnu
)
Copyright
(C
) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html
>
This is
free software
; you are
free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
2、下载安装包
bash官网:http://tiswww.case.edu/php/chet/bash/bashtop.html
bash5.0下载地址:ftp://ftp.cwru.edu/pub/bash/bash-5.0.tar.gz
3、安装bash5.0
上传bash5.0安装包到Linux服务器
解压安装包,并进入解压后文件夹
tar zxvf bash-5.0.tar.gz
cd bash-5.0
编译并安装
./configure
&& make && make install
备份原bash
mv /bin/bash /bin/bash.bak
建立bash软连接
ln -s /usr/local/bin/bash /bin/bash
4、查看安装后版本信息
[root@izbp1728di5ng6k1mlmgx9z bash-5.0
]
GNU bash, version 5.0.0
(1
)-release
(x86_64-pc-linux-gnu
)
Copyright
(C
) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html
>
This is
free software
; you are
free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
已经显示5.0版本信息,安装完成