You want to get bash for your Linux system, or you want to make sure you have the latest version.
bash is included in virtually all modern Linux distributions. To make sure you have the latest version available for your distribution, use the distribution’s built-in packaging tools.
You must be root or have the root password to upgrade or install applications. Some Linux distributions (notably Debian) include bash version 2.x as plain bash and version 3.x as bash3, so you need to watch out for that.
For Debian and Debian-derived systems such as Knoppix, Ubuntu, and MEPIS, make sure your /etc/apt/sources.
list file is pointing at an up-to-date Debian mirror; then use the graphical Synaptic, kpackage, gnome-apt, or Add/Remove Programs tools, the terminal-based aptitude tool, or from the command line:
1 |
apt-get update && apt-get install bash bash3 bash-builtins bash-doc bash3-doc |
For Red Hat distributions, including Fedora Core (FC) and Red Hat Enterprise Linux (RHEL), use the GUI Add/Remove Applications tool (if the GUI is missing from the menus, at a command line for RHEL3 type redhat-config-packages & or for RHEL4 type system-config-packages &).
For a command line only:
1 |
up2date install bash |
For Fedora Core and CentOS, you may use the above RHEL directions or from the command line:
1 |
yum update bash |
For SUSE, use either the GUI or terminal version of YaST. You may also use the command-line RPM tool.
For Mandriva/Mandrake, use the GUI Rpmdrake tool or from the command line:
1 |
urpmi bash |
It’s impossible to cover every Linux distribution and difficult even to cover the major ones, as they are all evolving rapidly.
Fortunately, much of that evolution is in the area of ease-of-use, so it should not be very difficult to figure out how to install software on your distribution of choice.
When using Knoppix, Ubuntu, or other Live CDs, software updates and installations will most likely fail due to the read-only media.
Versions of such distributions that have been installed to a hard disk should be updatable.
The apt-get update && apt-get install bash bash3 bash-builtins bash-doc bash3- doc command above will generate errors on systems that do not provide a bash3 package. You may safely ignore such errors.