从发行版的源中安装
# Kali GNU/Linux Rolling apt-get install bash
使用源码编译安装BASH(在Linux下)
各个发行版中已经预装了bash,如果想手动体验一把bash的编译,参考:
LFS/Bash-4.3.30: http://www.linuxfromscratch.org/lfs/view/7.10/chapter06/bash.html
BASH主页: https://www.gnu.org/software/bash/
下载BASH并进入源码目录;
准备BASH,然后进行编译:
#!/bin/bash # 准备 ./configure --prefix=/usr \ --docdir=/usr/share/doc/bash-4.3.30 \ --without-bash-malloc \ --with-installed-readline # The meaning of the new configure option: # # --with-installed-readline # This option tells Bash to use the readline library that is already installed on the system rather than using its own readline version. # 进行编译 make # 安装 make install mv -vf /usr/bin/bash /bin
安装的可执行命令
bash,主程序文件,交互的SHELL。
rbash,执行bash的快捷方式。存在于发行版的bash中。
bashbug,用于bug反馈。
clear_console,用于清除控制台。
参考文献
- apt-file list bash
- LFS/Bash-4.3.30: http://www.linuxfromscratch.org/lfs/view/7.10/chapter06/bash.html