Total Pageviews

Wednesday 30 July 2014

如何升级bash

root@as3:~# bash --version
GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.
root@as3:~# whereis bash
bash: /bin/bash /etc/bash.bashrc /usr/share/man/man1/bash.1.gz
root@as3:~# wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
root@as3:~# tar zxvf bash-4.3.tar.gz
root@as3:~# cd bash-4.3
root@as3:~/bash-4.3# ./configure --prefix=/usr/local/bash-4.3
root@as3:~/bash-4.3# make
root@as3:~/bash-4.3# make install
root@as3:~/bash-4.3#
root@as3:~/bash-4.3# mv  /bin/bash /bin/bash-3.2.39
root@as3:~/bash-4.3# ln -s /usr/local/bash-4.3/bin/bash /bin/bash
root@as3:~/bash-4.3# bash --version
显示:
GNU bash, version 4.3.0(1)-release (i686-pc-linux-gnu)
...

这样bash就升级到了4.3版。