Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Shells

Tested shells and versions

  • The shell included with the supported OS (the platform in bold) is the main supported shell.
  • Support for very old shells may be discontinued without notice.
  • The version with a dash does not work.
  • The version in italic may work, but some features are not working or unstable due to bugs in the shell.
  • Bourne shell (pre-POSIX shell) is not supported.

Packages

Alpine / BusyBox / OpenWrt (LEDE)

Default shell: busybox ash

Platform bash busybox dash loksh mksh oksh yash zsh
Alpine 3.15.4 5.1.16 1.34.1 7.0 -
Alpine edge 7.1 7.0 -
BusyBox 1.34.1 - 1.34.1 - - - - -
LEDE 17.01.7 1.25.1 - - -
OpenWrt 10.03.1 1.15.3 - - -
OpenWrt 12.09 1.19.4 - - -
OpenWrt 14.07 1.22.1 - -
OpenWrt 15.05.1 1.23.2 - - -
OpenWrt 18.06.9 1.28.4 - - -
OpenWrt 19.07.9 1.30.1 - - -
OpenWrt 21.02.3 1.33.2 - - -
  • busybox 1.15.3, 1.19.4: readonly is not working properly.
  • busybox hush not supported.

AlmaLinux / Rocky Linux / CentOS / Fedora

Default shell: bash

Platform bash busybox dash ksh mksh yash zsh
AlmaLinux 8.5 4.4.20 - - -
Rocky Linux 8.5 4.4.20 - - -
CentOS 7.9.2009 4.2.46 - - -
CentOS 8.4.2105 4.4.19 - - - 5.5.1
fedora 34 5.0.11
fedora 34 5.0.17
  • Testing bash 3.2.25- in POSIX mode only.

Debian / Ubuntu

Default shell: dash or bash (until debian 5.0)

Platform bash busybox dash ksh93 ksh2020 mksh pdksh posh yash zsh
Debian 2.2r7 2.03 - - - - - 5.2.14 - - 3.1.9
Debian 3.0r6 2.05a 0.60.2 ash 0.3.8 - - - 5.2.14 - - 4.0.4
Debian 3.1r8 2.05b 0.60.5 0.5.2 93q - - 5.2.14 0.3.14 - 4.2.5
Debian 4.0r9 3.1.17 1.1.3 0.5.3 93r - R28 5.2.14 0.5.4 - 4.3.2
Debian 5.0.10 3.2.39 1.10.2 0.5.4 93s+ 2008-01-31 - R35 5.2.14 0.6.13 - 4.3.6
Debian 6.0.10 4.1.5 1.17.1 0.5.5.1 93s+ 2008-01-31 - R39 5.2.14 0.8.5 - 4.3.10
Debian 7.11 4.2.37 1.20.0 0.5.7 93u+ 2012-02-29 - R40 - 0.10.2 2.30 4.3.17
Debian 8.11 4.3.30 1.22.0 0.5.7 93u+ 2012-08-01 - R50d - 0.12.3 2.36 5.0.7
Debian 9.13 4.4.12 1.22.0 0.5.8 93u+ 2012-08-01 - R54 - 0.12.6 2.43 5.3.1
Debian 10.12 5.0.3 1.30.1 0.5.10.2 93u+ 2012-08-01 - R57 - 0.13.2 2.48 5.7.1
Debian 11.3 5.1.14 1.30.1 0.5.11 93u+ 2012-08-01 - R59 - 0.14.1 2.50 5.8
Debian Bookworm 5.1.16 93u+m 1.0.0 beta.2 - - 2.52 5.8.1
Ubuntu 12.04 4.2.25 1.18.5 0.5.7 93u 2011-02-08 - R40 - 0.10 2.29 4.3.17
Ubuntu 14.04 4.3.11 1.21.0 0.5.7 93u+ 2012-08-01 - R46 - 0.12.3 2.35 5.0.2
Ubuntu 16.04 4.3.48 1.22.0 0.5.8 93u+ 2012-08-01 - R52c - 0.12.6 2.39 5.1.1
Ubuntu 18.04 4.4.20 1.27.2 0.5.8 93u+ 2012-08-01 - R56c - 0.13.1 2.46 5.4.2
Ubuntu 20.04 5.0.16 1.30.1 0.5.10.2 93u+ 2012-08-01 2020.0.0 R58 - 0.13.2 2.49 5.8
  • Use debian/eol docker images for older Debian versions.
  • Testing bash 2.03-3.2.39 in both POSIX and non-POSIX mode. bash 4.1.5- is non-POSIX mode only.
  • pdksh 5.2.14 (Debian 2.2.r7): readonly is not working properly.
  • ksh 93q, 93r: Sometimes abort due to unstable bugs.
  • busybox 1.1.3: Builtin commands cannot be mocked.
  • busybox 1.10.2: It may not work properly due to a bug.
  • posh 0.8.5: Signal handling (trap) broken.
  • posh 0.10, 0.10.2: Shell flags (e.g. set -e, set -u) not working properly.
  • zsh 4.2.5: errexit handling broken.

FreeBSD

Default shell: ash

Platform FreeBSD sh bash dash ksh mksh oksh pdksh zsh
FreeBSD 11.4 unknown 5.1.8 0.5.11.4 93u+ 2012-08-01 R59c 6.9 5.2.14 5.8
FreeBSD 12.3 unknown 5.1.16 0.5.11.5 93u+ 2012-08-01 R59c 7.0 5.2.14 5.8.1
FreeBSD 13.0 unknown 5.1.16 0.5.11.5 93u+ 2012-08-01 R59c 7.0 5.2.14 5.8.1
  • pdksh 5.2.14: Unstable on CI environment (Bus Error, Bad address, Memory fault, core dumped and etc).

macOS

Default shell: bash

Platform sh bash dash ksh mksh posh yash zsh
macOS 10.10 bash 3.2.57 3.2.57 - 93u+ 2012-08-01 - - - 5.0.5
macOS 10.11 bash 3.2.57 3.2.57 - 93u+ 2012-08-01 - - - 5.0.8
macOS 10.12 bash 3.2.57 3.2.57 - 93u+ 2012-08-01 - - - 5.2
macOS 10.13 bash 3.2.57 3.2.57 - 93u+ 2012-08-01 - - - 5.3
macOS 10.14.4 (Mojave) bash 3.2.57 3.2.57 - 93u+ 2012-08-01 - - - 5.3
macOS 10.15.5 (Catalina) bash 3.2.57 3.2.57 - 93u+ 2012-08-01 - - - 5.7.1
macOS 11.6.2 (Big Sur) bash 3.2.57 3.2.57 - 93u+ 2012-08-01 - - - 5.8
macOS 12.3.1 (Monterey) bash 3.2.57 3.2.57 - 93u+ 2012-08-01 - - - 5.8
macOS 12.3.1 (brew) - 5.1.0 0.5.11.2 2020.0.0 R59b 0.14.1 2.50 5.8
  • Supports the latest three versions.
  • Homebrew version of posh is broken.

Windows

Default shell: bash

Platform bash busybox dash mksh posh zsh
Windows Server 2019 (Git Bash) 4.4.23 - unknown - - -
Windows Server 2019 (msys) 5.1.16 1.31.1 0.5.11.5 R59 - 5.8
Windows Server 2019 (cygwin) 4.4.12 1.23.2 0.5.11.5 R56c 0.13.2 5.8
Windows Server 2019 (busybox-w32) - 1.35.0 (4487) - - - -

Manual test

This is not continuous test, it may break sometimes...

  • * Reported by user

Solaris

Platform /bin/sh /usr/bin/ksh /usr/sunos/bin/ksh /usr/sunos/bin/sh
Solaris 10 Bourne Shell ksh88 M-11/16/88i - -
Solaris 11 ksh93 93u+ 2012-08-01 - ksh88 M-11/16/88i Bourne Shell
  • ksh88 M-11/16/88i: Builtin commands cannot be mocked.

OpenBSD / NetBSD

Platform /bin/sh /usr/bin/ksh
FreeBSD 13 current FreeBSD sh -
OpenBSD 6.6 OpenBSD ksh (POSIX mode pdksh) 5.2.14 pdksh 5.2.14
NetBSD 9.0 NetBSD sh 20181212 BUILD:20200214000628Z pdksh 5.2.14

AIX

Platform Shells
AIX 7.2.1.4 * bash 4.3.30

Experimental

These are tested by Docker (contrib/test_in_docker.sh).

Schily Bourne Shell

Platform Schily versions bosh / pbosh
Debian bullseye AN-2021-09-18 2021/07/23

GWSH shell

Platform gwsh
Debian bullseye snapshot-20190627

Confirmation for bug

contrib/bugs.sh detects shell bugs and problems.

Usage: contrib/bugs.sh

Built-in commands

contrib/builtins.sh is a script for listing built-in commands.

Usage: contrib/builtins.sh