Building and Installing OSH

OSH is a bash-compatible shell, and is part of the Oil project (

This file describes how to install OSH. (It's in the release tarball and also published on the web.)

Quick Start

If you haven't already done so, extract the tarball:

tar -x --xz < oil-0.6.pre15.tar.xz
cd oil-0.6.pre15

Either install as /usr/local/bin/osh:

./configure      # completes very quickly
make             # 30-60 seconds
sudo ./install

or install as ~/bin/osh:

./configure --prefix ~

The latter doesn't require root access, but it requires ~/bin to be in your PATH.

NOTE: Out-of-tree builds are NOT currently supported, so you have to be in the oil-0.6.pre15 directory.

Smoke Test

OSH behaves like a POSIX shell:

$ osh -c 'echo hi'

This parses and prints a syntax tree for the 'configure' script.

osh -n configure

System Requirements

Roughly speaking, you need:

(I want to eventually remove the GNU requirements and require just POSIX sh instead).


Debian/Ubuntu and derivatives:

sudo apt install build-essential libreadline-dev

Alpine Linux:

apk add libc-dev gcc bash make readline-dev

OSH hasn't been tested on non-Linux systems, but eventually it should run on any POSIX-compatible system.

Build Options

./configure --help will show the options. Right now, the only significant options are --prefix and --{with,without}-readline.



Generated on Fri Feb 15 23:45:32 PST 2019