OpenBSD install BASH shell package

by Vivek Gite on June 18, 2007 · 3 comments

Q. How do I install BASH shell package under OpenBSD?

A. You need to use the pkg_add command to install packages BASH is available as binary packages over internet or from OpenBSD CD.

Login as root user. Use su - or sudo.

Next setup PKG_PATH using export command. You can make things really easy by using the PKG_PATH environment variable. Just point it to your favorite location, and pkg_add(1) will automatically look there for any package you specify, and also fetch and install the necessary dependencies of this package automatically.
$ export PKG_PATH=ftp://mirror.planetunix.net/pub/OpenBSD/4.1/packages/`machine -a`/

Caution: PKG_PATH variable MUST end in a slash (/).

OpenBSD Install bash shell binary package

Use pkg_add command as follows:
$ sudo pkg_add -i -v bash
OR
# pkg_add -i -v bash
Output:

parsing bash-3.2
Dependencies for bash-3.2 resolve to: gettext-0.14.6, libiconv-1.9.2p3 (todo: libiconv-1.9.2p3,gettext-0.14.6)
bash-3.2:parsing libiconv-1.9.2p3
bash-3.2:libiconv-1.9.2p3: complete
bash-3.2:parsing gettext-0.14.6
Dependencies for gettext-0.14.6 resolve to: expat-2.0.0, libiconv-1.9.2p3 (todo: expat-2.0.0)
bash-3.2:parsing expat-2.0.0
bash-3.2:expat-2.0.0: complete
bash-3.2:gettext-0.14.6: complete
Shell /usr/local/bin/bash appended to /etc/shells
bash-3.2: complete

To use bash, just enter bash command:
$ bash

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 3 comments… read them below or add one }

1 Dirkgent2ly February 18, 2009

Nice guide. Uh, how do you do this permanently?

Reply

2 Dirkgent2ly February 20, 2009

ok, chsh did it for me:

chsh -s bash

Got:

chsh: warning, unknown root shell

I had to logout and login again for it to take effect.

To make known a bashrc, I added to ~/.profile

source ~/.bashrc

Good tutorials Vivec, always enjoy reading your posts.

Reply

3 The Doctor June 13, 2009

Perfect installation, but any follow-up for setting bash color profiles? I’ve noticed 4.5 *doesn’t* like using .bashrc (GNU/Linux) opting for .bash_profile, nor do the numerous online Linux how-tos/guides (ie: http://wiki.archlinux.org/index.php/Color_Bash_Prompt) adapt themselves to OpenBSD.

OpenBSD 4.5 w/ bash 3.2.48

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 14 + 12 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: