Bootstrap FreeKB - Bash (Scripting) - Install an older version of Bash from source
Bash (Scripting) - Install an older version of Bash from source

Updated:   |  Bash (Scripting) articles

Let's start by listing the current version of Bash that is installed.

]# bash -version
GNU bash, version 5.1.8(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2020 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

 

To install a specific version of Bash, you are going to download the Bash installation tarball from http://ftp.gnu.org. For example, wget can be used to download the bash-4.4.18.tar.gz file.

wget http://ftp.gnu.org/gnu/bash/bash-4.4.18.tar.gz

 

Extract the tar archive.

tar -zxpf bash-4.4.18.tar.gz --directory /tmp

 

You can now remove the tar archive.

rm bash-4.4.18.tar.gz

 

Move into the extracted directory.

cd /tmp/bash-4.4.18

 

And then run the configure script.

./configure

 

And then run the make command.

sudo make

 

Now Bash should be installed at /tmp/bash-4.4.18 in this example.

~]# /tmp/bash-4.4.18/bash -version
GNU bash, version 4.4.18(1)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2016 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.

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 4f2e22 in the box below so that we can be sure you are a human.