Automic VaultAutomic Vault

brew

Install mksh with Homebrew, apk, apt, dnf, MacPorts, Nix, zypper

MirBSD Korn Shell. Version 59c via Homebrew; verified from local package data.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install mksh

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install mksh

MacPorts ports tree · shells/mksh/Portfile · source: api.github.com

Linux

Alpine Linux apkverified · 92%
sudo apk add mksh

Alpine Linux edge package indexes · mksh · source: dl-cdn.alpinelinux.org

Debian aptverified · 92%
sudo apt install mksh

Debian stable package indexes · mksh · source: deb.debian.org

Fedora dnfverified · 92%
sudo dnf install mksh

Fedora Rawhide package metadata · mksh · source: dl.fedoraproject.org

Nixverified · 92%
nix profile install nixpkgs#mksh

nixpkgs package indexes · pkgs/by-name/mk/mksh/package.nix · source: api.github.com

openSUSE zypperverified · 92%
sudo zypper install mksh

openSUSE Tumbleweed package metadata · mksh · source: download.opensuse.org

overview

Package summary

MirBSD Korn Shell

Commands and aliases

  • mksh

history

Project history and usage

mksh, the MirBSD Korn Shell, is a Bourne/POSIX/Korn-style command interpreter and scripting language. The official site describes it as an actively developed free implementation of the Korn Shell programming language and successor to the Public Domain Korn Shell line.

Project history

The mksh FAQ traces the lineage from the Public Domain Bourne Shell and pdksh, through OpenBSD cleanup work, to MirBSD development beginning in 2002. After 2004, development added portability, parser reorganization, bug fixes, and features influenced by ksh93, bash, zsh, BSD csh, and POSIX work.

The official mksh page lists R59c from October 31, 2020 as the current version and provides signed source distributions plus instructions for CVS HEAD.

Adoption history

mksh became the system shell in several operating systems and Linux distributions. The FAQ says it is used as Android's system shell for startup, background, and user-invoked commands.

Its broad packaging footprint across Homebrew, Debian, Ubuntu, Alpine, Fedora, Nix, MacPorts, and SUSE reflects a mature portable shell rather than a platform-specific utility.

How it is used

The mksh manual describes it as a command interpreter for both interactive and shell-script use, with a command language that is a superset of sh and POSIX shell and largely compatible with the original Korn shell.

Interactive users normally use `~/.mkshrc` or `$ENV`; login shells also process profile files. Packagers commonly install `dot.mkshrc` into `/etc/skel/.mkshrc` or `/etc/mkshrc` with a user-editable wrapper.

Why package nerds care

mksh matters to package nerds because shells sit at the boundary between user environment, system boot scripts, and package maintainer scripts. It is a small but consequential runtime whose packaging choices affect `/bin/sh` compatibility, skeleton rc files, Android system behavior, and historical Korn shell compatibility.

It is also a case where the official project explicitly labels its GitHub mirror unofficial, so package metadata should prefer the MirBSD homepage, signed distfiles, manual, FAQ, and CVS/CVSweb sources.

Timeline

  • 1980s: Public Domain Bourne Shell lineage begins, later becoming pdksh.
  • 1999: pdksh development ends.
  • 2002: Development of what became mksh starts as MirBSD's system shell.
  • 2003: OpenBSD cleanup of pdksh feeds into the lineage.
  • 2004: mksh sees independent parser, portability, and feature work.
  • 2020-10: Official page lists mksh R59c as current.

Related projects

  • mksh is related to pdksh, oksh, AT&T ksh/ksh93, POSIX sh, bash, zsh, lksh, Android system shell usage, MirBSD, Debian, and OpenWrt/FreeWRT packaging.

security posture

Risk level: yellow

generalized runtime or code generation signal.

Risk classifier

yellow risk · medium confidence · runtime

Why

  • generalized runtime or code generation signal

Signals

  • text:shell

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 13 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Linux
/etc/skel/.mkshrc/etc/mkshrc
Unix
~/.mkshrc~/.profile/etc/profile/etc/suid_profile/etc/shells

executables

Installed executables

CommandKindExposureNote
mkshcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version59c
manager updated
local dataok
upstreamnot checked
latest detectednot detected

https://mbsd.evolvis.org/mksh.htm

  • infoNo package-manager update timestamp was available.low confidence
  • infoRelease/tag comparison is only available for GitHub repositories.https://mbsd.evolvis.org/mksh.htmnone confidence

install metadata

Package metadata

Package keybrew:mksh
Version59c
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/mksh
Homepagehttps://mbsd.evolvis.org/mksh.htm
Repositoryhttps://www.mirbsd.org/cvs.cgi/src/bin/mksh
Upstream docshttps://mbsd.evolvis.org/mksh.htm
LicenseMirOS
Source archivehttps://mbsd.evolvis.org/MirOS/dist/mir/mksh/mksh-R59c.tgz
Bottleavailable (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namemksh
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Debian apt95%

mksh 59c-41+b2

MirBSD Korn Shell

http://mirbsd.de/mksh

sudo apt install mksh
  • Section: shells
  • Architecture: amd64
  • Source Package: mksh
  • 1 dependencies
  • 1 optional deps
  • normalized package name match
  • Matched by: Mksh
Debian stable package indexes · deb.debian.org · Debian stable package indexes: mksh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

mksh

nix profile install nixpkgs#mksh
  • normalized package name match
  • Matched by: Mksh
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/mk/mksh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

mksh 59c-37

MirBSD Korn Shell

http://mirbsd.de/mksh

sudo apt install mksh
  • Section: universe/shells
  • Architecture: amd64
  • 1 dependencies
  • 1 optional deps
  • normalized package name match
  • Matched by: Mksh
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: mksh from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

mksh 59c-r4

MirBSD Korn Shell

https://www.mirbsd.org/mksh

sudo apk add mksh
  • License: MirOS AND Unicode-DFS-2016
  • Architecture: x86_64
  • Source Package: mksh
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Mksh
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: mksh from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

mksh-doc 59c-r4

MirBSD Korn Shell (documentation)

https://www.mirbsd.org/mksh

sudo apk add mksh-doc
  • License: MirOS AND Unicode-DFS-2016
  • Architecture: x86_64
  • Source Package: mksh
  • normalized package name match
  • Matched by: Mksh
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: mksh-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
dnf95%

mksh 59c-15.fc44

MirBSD enhanced version of the Korn Shell

https://www.mirbsd.org/mksh.htm

sudo dnf install mksh
  • License: MirOS AND ISC
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: mksh
  • 7 dependencies
  • 8 provides
  • normalized package name match
  • Matched by: Mksh
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: mksh from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
zypper95%

mksh 59c-7.1

MirBSD Korn Shell

https://mbsd.evolvis.org/mksh.htm

sudo zypper install mksh
  • License: ISC AND MirOS
  • Category: System/Shells
  • Architecture: x86_64
  • Source Package: mksh
  • 2 dependencies
  • 3 provides
  • normalized package name match
  • Matched by: Mksh
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: mksh from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst
MacPorts95%

mksh

sudo port install mksh
  • normalized package name match
  • Matched by: Mksh
MacPorts ports tree · api.github.com · MacPorts ports tree: shells/mksh/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment