Skip to content
Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh).
C Roff Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CVS
.gitignore Add pconfig.h to .gitignore Jun 3, 2018
.travis.yml Travis-CI is removing osx_image: xcode6.4 soon. Let's just use the Jan 10, 2019
CONTRIBUTORS Update to what will likely be ksh in OpenBSD 6.5. Apr 6, 2019
LEGAL Import oksh Jan 6, 2015
NOTES Add check for confstr() and minimal portable implementation of it. Jan 13, 2018
PROJECTS Sync with OpenBSD. Add configure check for -w flag; use it if your co… Jan 12, 2018
README.md Release oksh-6.6 Oct 21, 2019
README.pdksh Update to latest OpenBSD ksh code. Add Cygwin support. Sep 17, 2017
alloc.c
asprintf.c asprintf.c - stray whitespace Jun 6, 2018
c_ksh.c Pull in all ksh changes up to Jul 23, 2019
c_sh.c Update to latest ksh(1) code. This changes all use of long to Apr 21, 2018
c_test.c Pull in all ksh changes up to Jul 23, 2019
c_test.h Import oksh Jan 6, 2015
c_ulimit.c Pull in all ksh changes up to Jul 23, 2019
charclass.h Convert GNU make to a configure script and POSIX make. Jan 7, 2018
config.h Update to latest code. Jan 16, 2018
configure Update to OpenBSD ksh code from 2019-01-09. Jan 10, 2019
confstr.c Add check for confstr() and minimal portable implementation of it. Jan 13, 2018
edit.c Pull in all ksh changes up to Jul 23, 2019
edit.h
emacs.c Update to what will likely be ksh in OpenBSD 6.5. Apr 6, 2019
eval.c Pull in all ksh changes up to Jul 23, 2019
exec.c Pull in all ksh changes up to Jul 23, 2019
expand.h Convert GNU make to a configure script and POSIX make. Jan 7, 2018
expr.c Update to what will likely be ksh in OpenBSD 6.5. Apr 6, 2019
history.c Update to latest ksh code; fixes a hard failure with history. Nov 2, 2019
io.c CVSROOT: /cvs Jul 24, 2019
jobs.c Pull in all ksh changes up to Jul 23, 2019
ksh.1 Pull in all ksh changes up to Jul 23, 2019
lex.c Update to latest code. Jan 16, 2018
lex.h Update to latest code. Jan 16, 2018
mail.c Update to what will likely be ksh in OpenBSD 6.5. Apr 6, 2019
main.c Pull in all ksh changes up to Jul 23, 2019
misc.c Pull in all ksh changes up to Jul 23, 2019
oksh.1 Update oksh.1 Apr 7, 2019
path.c Pull in all ksh changes up to Jul 23, 2019
portable.h Protect timespec* macros with ifndef rather than !OpenBSD. Jul 24, 2019
prescue.h Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
profile Remove clear line from example .profile Oct 24, 2019
reallocarray.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
rescue.sh Add asprintf to rescue script. Sep 23, 2018
sh.1 CVSROOT: /cvs Jun 20, 2019
sh.h Update to what will likely be ksh in OpenBSD 6.5. Apr 6, 2019
shf.c Pull in all ksh changes up to Jul 23, 2019
shf.h
siglist.c Build oksh with musl-libc (checked with Alpine Linux). Jan 14, 2018
signame.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
strlcat.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
strlcpy.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
strtonum.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
syn.c Update to latest OpenBSD code. May 3, 2018
sys-queue.h Have all OS's always use portability queue routines. Jul 28, 2018
table.c Update to latest upstream code. Jan 17, 2018
table.h We're approaching OpenBSD 6.4 now; this is close to what will be Sep 23, 2018
trap.c Update to OpenBSD ksh code from 2019-01-09. Jan 10, 2019
tree.c Update to latest ksh(1) code. This changes all use of long to Apr 21, 2018
tree.h Update to latest OpenBSD ksh code. Add Cygwin support. Sep 17, 2017
tty.c
tty.h Update to latest OpenBSD ksh code. Add Cygwin support. Sep 17, 2017
unvis.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
var.c
version.c Import oksh Jan 6, 2015
vi.c This is the OpenBSD 6.3 ksh. Apr 2, 2018
vis.c Check for pledge in configure. Lets oksh build on old versions of Ope… Jan 12, 2018
vis.h Build oksh with musl-libc (checked with Alpine Linux). Jan 14, 2018

README.md

oksh

Portable OpenBSD ksh(1).

Why?

Because all operating systems deserve a good shell.

Supported systems

oksh is known to run on the following Operating Systems:

  • OpenBSD
  • FreeBSD
  • DragonFly BSD
  • NetBSD
  • HardenedBSD
  • SoloBSD (as the default shell)
  • Mac OS X
  • Linux (glibc and musl)
  • Cygwin
  • Android (via Termux)
  • AIX (with major thanks to @tssva and @NattyNarwhal)
  • IBM i PASE
  • Solaris
  • Illumos

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

Believed working

We believe that oksh will work on the following platforms, but testing is needed. Help is greatly appreciated and encouraged!

  • HPUX
  • Irix

Supported compilers

oksh is known to build with the following C compilers:

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

Packages

oksh is included in some package systems.

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

Dependencies

A C99 compiler is the easiest way to ensure that oksh will build correctly. Please see the list of C compilers above for a list of known working compilers.

Though not required, the ncurses library will be used for screen clearing routines if the library is found during the configure stage. This can be turned off by the user by passing the --disable-curses flag to configure.

A configure script that produces a POSIX Makefile is provided to ease building and installation and can be run by:

$ ./configure
$ make && sudo make install

In case of emergency

If you cannot execute make for whatever reason, a rescue script, rescue.sh, is available. This script contains nothing more than a hand-written list of compiler invocations which will build oksh in the most basic and portable way possible. This rescue shell is perfectly usable (as it is just an unoptimized build).

License

The main Korn shell files are public domain (see LEGAL). Portability files are BSD or ISC licensed; see individual file headers for details.

Get a tarball

See releases tab. The latest release is oksh-6.6, which matches the ksh(1) from OpenBSD 6.6.

You can’t perform that action at this time.