Install and configure bash on OpenBSD 6.6
After installing openbsd 6.6 and coming from a linux background, am used to the bash shell.In this tutorial, i install bash shell and configure it.
install bash
# pkg_add bash
On openbsd 6.6, ksh is the default shell, so we will change to bash.
# chsh -s /usr/local/bin/bash
To use bash, just type bash and you will be presented with
-bash-5.0#
we then configure PS1 bash prompt. create bashrc file with and add the following content.
# echo "export PS1="[\u@\h \W] "" >> ~/.bashrc
We add the following to the bottom of the file .profile, so its load bashrc file:
# nano ~/.profile
if [ -s ~/.bashrc ]; then
source ~/.bashrc;
fi
You can reboot server or just source the bashrc file with:
# source ~/.bashrc