Install bash
Jump to navigation
Jump to search
FreeBSD has csh installed by default, which is okay for interactive use and stinks for scripting.
FreeBSD also has tcsh, which is very good for interactive use but still stinks for scripting.
FreeBSD also has the Bourne shell (sh) which is great for scripting and stinks for interactive use.
Bash is excellent at scripting and interactive use, but FreeBSD will not include bash because bash is not BSD licensed. For the purposes of this install, you can either use 'sh', or install bash. I use bash on my Mac desktops and Linux servers so I prefer to have bash on my FreeBSD servers too. Install bash with some reasonable defaults by running these commands:
pkg install -y bash chpass -s /usr/local/bin/bash tee -a /root/.bash_profile <<EO_BASH_PROFILE export HISTCONTROL=erasedups export HISTIGNORE="&:[bf]g:exit" shopt -s cdspell bind Space:magic-space alias h="history 25" alias ls="ls -FG" alias ll="ls -alFG" EO_BASH_PROFILE