Bash is a popular shell that is available also on Linux distros. If you are more familiar with the
bash shell and would prefer to use that as your default shell, you can make that adjustment in a few short steps.
bash is not supported on FreeBSD 11.1, and the instructions in this section will not work for that particular version.
First, you need to install the
bash shell by typing:
sudo pkg install bash
You will be prompted to confirm that you want to download the package. Do so by pressing
y and then
After the installation is complete, you can start
bash by running:
This will update your shell prompt to look like this:
To change freebsd's default shell to
bash, you can type:
sudo chsh -s /usr/local/bin/bash freebsd
The next time you log in, the
bash shell will be started automatically instead of the current default.
If you wish to change the default pager or editor in the
bash shell, you can do so in a file called
~/.bash_profile. This will not exist by default, so you will need to create it:
Inside, to change the default pager or editor, add your selections like this:
export PAGER=less export EDITOR=ee
Save and close the file when you are finished by pressing
exit, and then pressing
To implement your changes immediately,
source the file:
If you'd like to make further changes to your shell environment, like setting up special command aliases or setting environment variables, you can reopen that file and add your new changes to it.