How to Update Bash In Linux Operating System

In this tutorial we are going to learn how to update bash in Linux Operating System. We will look how to update bash (GNU Bourne Again shell) in both Redhat Based Linux distributions and Debian Based Linux Distributions.

  1. Update Bash in Redhat/CentOS/Fedora Linux.
  2. Update Bash in Debian/Ubuntu/Linux Mint.

Find Current Bash Version

You will need to check the bash version before and after updating the bash. We can check the version with bash --version command.

bash --version

This will print the bash version on Linux terminal.

Update Bash on CentOS/Redhat/Fedora Linux

In Redhat based Linux Distributions, We update bash using the yum update command.

First, you can check whether bash updates are available or not, using the yum check-update command.

yum check-update bash

If bash updates are available, Then update bash with yum command.

yum update bash

Update Bash on CentOS/Redhat/Fedora Linux
Update Bash in CentOS 7

The yum command works for Redhat Based Linux Distribution which includes (Red Hat Enterprise Linux, CentOS, Scientific Linux and Oracle Linux ).

For Fedora Linux, You will need to use dnf command instead of the yum command.

dnf update bash

Update Bash in Ubuntu / Debian / Linux Mint

For Debian Based Linux Distributions, use apt-get install command to upgrade bash.

apt-get install --only-upgrade bash

Debian based Linux distribution includes Debian Linux, Ubuntu, Linux Mint, etc.

Update Bash Linux - How to Update Bash In Linux Operating System


In this tutorial we learned how to perform bash update in Linux Operating System.

  • For Redhat Based Distributions, we used yum update command to upgrade bash.
  • For Debian Based Linux Distribution we used apt-get install --only-upgrade bash to update Bourne Again shell.