Need help with oksh?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

184 Stars 23 Forks 235 Commits 3 Opened issues


Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh).

Services available


Need anything else?

Contributors list


Portable OpenBSD

. Not an official OpenBSD project.


Because all operating systems deserve a good shell.

Unlike other ports of OpenBSD ksh, this port is entirely self-contained and aims to be maximally portable across operating systems and C compilers. We are always looking for new combinations to add support for.

Supported systems

is known to run on the following Operating Systems: * OpenBSD * FreeBSD * DragonFly BSD * NetBSD * HardenedBSD * SoloBSD (as the default shell) * Mac OS X (port originally by @geoff-nixon) * Linux (glibc and musl) * Cygwin * Android (via Termux) * AIX (with major thanks to @tssva and @NattyNarwhal) * IBM i PASE * Solaris * Illumos * midipix * WSL * WSL2 * Unixware 7 * Haiku * HP-UX (gcc only) * SerenityOS

Running on a system not listed here? Add it and send a pull request!

Believed working

We believe that

will work on the following platforms, but testing is needed. Help is greatly appreciated and encouraged! * Irix

Supported compilers

is known to build with the following C compilers: * clang * gcc * pcc * cparser * xlc * Sun Studio compiler * lacc * Optimizing C Compilation System (CCS) 4.2 03/27/14 (uw714mp5.bl4s) * Tiny C Compiler * CompCert * Nils Weller's C compiler * cproc (Currently requires a small tweak to ignore a volatile store error)

Building with a compiler not listed here? Add it and send a pull request!


is included in some package systems.

Packaging status

In addition, there are some unofficial packages: * Ubuntu PPA * Debian

Using a package not listed here? Add it and send a pull request!


A C99 compiler is the easiest way to ensure that

will build correctly. Please see the list of C compilers above for a list of known working compilers.

Though not required, the

library will be used for screen clearing routines if the library is found during the
stage. This can be turned off by the user by passing the
flag to


script that produces a
is provided to ease building and installation and can be run by:
$ ./configure
$ make && sudo make install

Cross compiling

Cross compiling can be achieved by running

as follows:
CC=/path/to/cross/cc CFLAGS="any needed cflags" LDFLAGS="any needed ldflags" ./configure --no-thanks

This will skip all

checks and write out a generic
with nearly no options turned on. If using a cross gcc or clang, this very well may just work (with all compat compiled in). You can edit these files to reflect your system before running

All environment variables and configure flags are respected when using

. Further specifying
will only compile the source files into object files, to be transfered onto the target machine and linked there.


flag can also be used to compile a native
with all the compatibility functions compiled in, rather than relying on the system's version of those functions.

Submitting patches

Patches that add new platforms and improve support for existing platforms are always welcome.

Patches that cause

to deviate from upstream OpenBSD ksh behavior are better suited to be sent to the OpenBSD [email protected] mailing list. Please make sure to test your patch on an OpenBSD machine first before submitting it to [email protected] I will sync with the upstream OpenBSD code once your patch is accepted. If you'd like to open an issue here to track progress of your patch on [email protected], that's fine.


The main Korn shell files are public domain (see

). Portability files are BSD or ISC licensed; see individual file headers for details.

Get a tarball

See releases tab. The latest release is oksh-7.0, which matches the ksh(1) from OpenBSD 7.0, released October 14, 2021.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.