zsh(1) on Solnix vs Linux and the BSDs
zsh is not in the Solnix base system; install pkgs.solnix.zsh to get it. The Solnix page text in the bundle is empty, so the only documented behaviour is from the Linux zsh-5.9.1 page. That page says zsh does not provide POSIX compatibility in its default mode.
The manual pages
What Solnix runs
Not installed by default: add pkgs.solnix.zsh. The bundle lists no other illumos variants. The Solnix zsh(1) page text in the bundle is empty, so the manual does not say how the Solnix package differs from the Linux zsh-5.9.1 page. The Linux notes below apply to Solnix only if the package is the same zsh.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | availability on Solnix | No zsh is on PATH in a default Solnix system. It must be installed from pkgs.solnix.zsh before scripts or login settings can use it. The bundle contains no BSD zsh pages to compare. Source: Bundle header (command on PATH: none: install pkgs.solnix.zsh; no freebsd/openbsd/netbsd counterpart); Solnix zsh(1) text is empty |
| Linux | POSIX compatibility in default mode | The Linux page says zsh does not provide compatibility with POSIX or other shells in its default operating mode. A POSIX sh script run under plain zsh may behave differently. The Solnix page text is empty, so it gives no contrary statement. Source: Linux zsh(1) DESCRIPTION; COMPATIBILITY (last paragraph); Solnix zsh(1) empty |
| Linux | emulation selected by invocation name | On Linux, zsh emulates sh or ksh when the first letter of its invoked name, ignoring an initial r, is b, s or k. Under su, it tries to take the name from SHELL. The Solnix page does not say. Source: Linux zsh(1) COMPATIBILITY (first paragraph) |
| Linux | startup files in sh/ksh mode | In sh/ksh emulation on Linux, the usual zsh startup and shutdown scripts are not run. Login shells source /etc/profile then $HOME/.profile, and then $ENV if set. ENV gets parameter, command and arithmetic expansion first. PRIVILEGED also affects startup files.Source: Linux zsh(1) COMPATIBILITY (third paragraph) |
| Linux | options changed in sh/ksh mode | On Linux, invoking zsh as sh or ksh sets options such as SH_WORD_SPLIT, KSH_ARRAYS, GLOB_SUBST, NO_NOMATCH and POSIX_BUILTINS. Invocation as sh also sets BSD_ECHO and IGNORE_BRACES. Word splitting and array indexing therefore differ from default zsh. Source: Linux zsh(1) COMPATIBILITY (options paragraph) |
| Linux | special parameters in emulation | In sh and ksh modes on Linux, parameters such as path, fpath, argv, status, prompt, PROMPT and psvar are not special and not initialized. A script relying on path or status as special parameters will not get them there. Source: Linux zsh(1) COMPATIBILITY (second paragraph) |
| Linux | emulation is not guaranteed | The Linux page says zsh does not guarantee complete emulation of other shells, nor POSIX compliance, despite reasonable efforts to address incompatibilities. Source: Linux zsh(1) COMPATIBILITY (last paragraph) |
Standards
- POSIX: zsh is not a POSIX.1-2024 utility.
- Linux: The Linux page states that zsh does not provide compatibility with POSIX or other shells in its default operating mode, and does not guarantee POSIX compliance in emulation modes.
Writing portable scripts
- Do not rely on zsh in portable scripts. Write them for sh and use #!
/bin/sh.Use zsh-specific syntax only after checking that zsh is installed, since Solnix does not ship it by default.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.