loksh is a Linux port of the Korn shell supplied by OpenBSD. It follows the OpenBSD source closely and deliberately keeps platform-specific changes to a minimum rather than adding its own extensions.
The shell is intended for both interactive use and shell scripting. Its command language is a superset of the traditional Bourne shell language, with Korn shell facilities for arithmetic, arrays, job control, command-line editing and reusable functions. loksh targets Linux exclusively, which helps keep the port compact and makes it suitable for lightweight or resource-constrained systems.
This is public domain software.
Key Features
- Linux port of OpenBSD’s Korn shell.
- Closely tracks the upstream OpenBSD implementation.
- Keeps downstream modifications and additional features to a minimum.
- Suitable for interactive use and shell scripts.
- Mostly compatible with POSIX shell and AT&T Korn shell behaviour.
- Run commands, functions, builtins and external executables.
- Variables, positional parameters and indexed arrays.
- Parameter, command, arithmetic and tilde substitution.
- Integer arithmetic expressions using (( expression )).
- Conditional expressions using [[ expression ]].
- Filename globbing and pattern matching.
- Brace expansion and tilde expansion.
- Input and output redirection, including here documents.
- Construct pipelines and optionally enable pipefail behaviour.
- Conditional execution using && and ||.
- Asynchronous commands and background pipelines.
- Co-process support using the |& operator.
- If, case, for, select, while and until compound commands.
- User-defined shell functions.
- Interactive job control with jobs, fg, bg, wait and kill builtins.
- Command history and the fc history editor.
- Emacs, gmacs and Vi command-line editing modes.
- Aliases and command hashing.
- Signal and exit handling through shell traps.
- Login-shell processing through /etc/profile and the user’s .profile.
- Interactive startup configuration through the ENV parameter.
- Restricted-shell mode prevents directory changes, path modifications and unsafe redirections.
- Privileged-shell mode uses a separate system profile.
- Can be invoked as ksh, sh or restricted rksh.
- Small implementation without an external plugin or scripting framework.
Website: github.com/dimkr/loksh
Support:
Developer: dimkr and OpenBSD developers
License: Public Domain
loksh is written in C. Learn C with our recommended free books and free tutorials.
Related Software
| Shells | |
|---|---|
| zsh | Advanced and programmable command interpreter |
| Nushell | Adopts the Unix philosophy of shells where pipes connect command together |
| fish | Smart and user-friendly command line shell |
| Xonsh | Python-powered, cross-platform shell language and command prompt |
| bash | sh-compatible command language interpreter |
| Murex | Intuitive, typed and content aware shell |
| PowerShell | Cross-platform automation and configuration framework |
| Elvsh | Expressive programming language and a versatile interactive shell |
| Oils | Billed as an upgrade to bash. Written in Python. |
| DASH | POSIX-compliant implementation of sh that aims to be as small as possible |
| sh | Shell parser, formatter, and interpreter |
| tcsh | C shell with file name completion and command line editing |
| mksh | MirBSD Korn shell |
| ksh | Unix shell which was developed by David Korn at Bell Labs |
| brush | POSIX- and bash compatible shell |
| Rash | Language, library, and shell REPL for Racket. |
| ion | Modern system shell that features a simple, yet powerful, syntax |
| Cicada | Bash-like command environment with scripting and job control |
| Yash | Yet another shell |
| oksh | Portable OpenBSD ks |
| es | Extensible shell with higher-order functio |
| dune | A shell by the beach |
| cosh | Concatenative command-line she |
| Marcel | Modern command environment combining Python with Unix pipelines |
| Hilbish | Highly extensible command environment configured with Lua |
| gsh | POSIX-compatible generative shell |
| arsh | Statically typed scripting language with shell-like features |
| Sushi shell | Bash clone shell implemented in Rust |
| loksh | Linux port of OpenBSD's Korn-compatible command interpreter |
| fortsh | Shell written in Fortran |
| hsh | Slightly different take on your shell |
| ReShell | Modern shell |
| rash | Rudimentary shell |
| Dax | Custom Unix shell implementation |
| cjsh | POSIX-oriented command environment with modern interactive features |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.