Okay, let's break this down. You've compiled Bash 5.3, but your system is still using Bash 5.2. You want to manage both and make 5.3 the default sometimes.
First, a small correction: Bash is developed by the GNU Project, not GNOME. You likely downloaded it from the official GNU Bash website or a mirror.
1. Where is Bash 5.3 Installed?
When you compile software from source using the standard ./configure && make && sudo make install process (or similar, like your tar followed by compilation steps), the binaries are typically installed into /usr/local/bin by default. The system's default Bash is usually in /bin/bash.
-
Check the likely location:
ls -l /usr/local/bin/bash
If this command shows the bash executable, that's where your compiled version is.
-
Check the currently running Bash version:
echo $BASH_VERSION
# or
bash --version
This will likely show 5.2 if that's your system default.
-
Check which bash executable is being found first:
which bash
This should point to /bin/bash (or maybe /usr/bin/bash). If /usr/local/bin isn't in your $PATH before /bin, or if you haven't configured it to use the new version, the system will keep using the old one.
2. How to Persistently Use Bash 5.3 and Switch Between Versions
There are a few ways to handle this, ranging from simple to more integrated. The best method for Debian-based systems like Parrot OS is usually update-alternatives.
Method 1: Using update-alternatives (Recommended)
This is the standard Debian/Ubuntu way to manage multiple versions of the same command.
-
Install the new Bash version into the alternatives system: