I'm trying to update bash on CentOS 7 – I need at least 4.4 for my project and the default shell on it is 4.2. It's a production server, so I literally just want a new version of bash as the default shell and that's it; I don't want to be messing around too much or updating anything else.
Anyway, running:
yum update bash
returns
No packages marked for update
The command:
yum repolist all
shows that the CentOS 7 updates repo is enabled (not CentOS 7.* base/updates though).
As a result, this command:
yum --enablerepo=updates update bash
does nothing.
I can share my CentOS-Base.repo file, if it helps. What am I doing wrong?
Best Answer
The point of distributions like RedHat (and thus CentOS) is that it's stable; it doesn't have the latest version of every software, it has a consistent version. For CentOS7 the current version is
bash-4.2.46-33.el7
. RedHat will backport security fixes but may not backport functionality enhancements because they can cause compatibility issues.If you need a different version then you may need to compile it from source and place it in a non-standard location (e.g.
$HOME/bin/bash
). Don't overwrite/bin/bash
because the OS may replace it at any time throughyum update
.In comparison, RedHat 8 (CentOS8) has bash 4.4, and Debian 10 has bash 5.0