set(1) on Solnix vs Linux and the BSDs
On Solnix, set, unset, setenv, unsetenv and export are shell built-ins, not programs on PATH, and the one Solnix page covers sh, csh, ksh and ksh93 together. The FreeBSD page named set(1) is only an index of built-ins and documents no set options, so FreeBSD behaviour must be read from sh(1) and csh(1).
The manual pages
- Solnix: set(1) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: set(1) 15.1-RELEASE
What Solnix runs
There is no separate binary: the command is a built-in of sh, ksh, ksh93 or csh. The page gives a different synopsis and option set for each shell. The sh form takes only -- and a e f h k n t u v x. The ksh form adds -A -b -C -m -o -p, and ksh93 adds -G and -r. The bundle has no Linux, OpenBSD or NetBSD counterpart pages, so nothing is claimed about them.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD | what the page documents | FreeBSD set(1) is the builtin(1) index page (NAME: builtin, keybinds). It says only whether set exists in csh and sh, and does not list set options. The Solnix page documents every option for each shell. Source: FreeBSD set(1) NAME, DESCRIPTION, Commands table (set: csh Yes, sh Yes); Solnix set(1) SYNOPSIS, DESCRIPTION |
| FreeBSD | shells covered | FreeBSD lists built-ins only for csh(1) and sh(1). Solnix also documents ksh and ksh93 forms of set, unset and export, including ksh -o option names and ksh93 -G and -r.Source: FreeBSD set(1) DESCRIPTION; Solnix set(1) SYNOPSIS (ksh, ksh93), DESCRIPTION (ksh) |
| FreeBSD | export and setenv availability | On FreeBSD, export exists only in sh, and setenv and unsetenv only in csh. Solnix documents export for sh, ksh and ksh93, and setenv and unsetenv for csh. The shell-to-built-in split matches. Source: FreeBSD set(1) Commands table (export, setenv, unsetenv); Solnix set(1) SYNOPSIS |
| FreeBSD | sh option set | The Solnix sh set built-in documents only -- and the flags a e f h k n t u v x. It lists no -C (noclobber) and no -o. Those appear only in the ksh section. The FreeBSD page does not say which flags its sh accepts.Source: Solnix set(1) SYNOPSIS (sh) and DESCRIPTION (sh); FreeBSD set(1) DESCRIPTION |
| FreeBSD | -h meaning differs between Solnix shells | In Solnix sh, set -h remembers function commands as functions are defined. In Solnix ksh, set -h makes each command a tracked alias when first seen. The FreeBSD page does not document -h.Source: Solnix set(1) DESCRIPTION sh -h, ksh -h; FreeBSD set(1) DESCRIPTION |
| FreeBSD | unset protected variables | Solnix sh cannot unset the variables the page prints as PATH, PS1, PS2, MAILCHECK and IF. The FreeBSD page does not say whether any variable is protected from unset. Source: Solnix set(1) DESCRIPTION (sh, unset); FreeBSD set(1) Commands table (unset) |
| FreeBSD | csh set and unset semantics | Solnix csh unset takes a filename-substitution pattern, so unset * removes all variables. unsetenv does no pattern matching. set var[n]=word replaces the n'th word of a list. The FreeBSD page does not describe csh syntax. Source: Solnix set(1) DESCRIPTION (csh); FreeBSD set(1) DESCRIPTION |
| FreeBSD | built-ins not on the Solnix page | FreeBSD's sh index lists local and setvar. The Solnix set(1) page covers neither, so the bundle does not show whether Solnix shells have them. Source: FreeBSD set(1) Commands table (local, setvar); Solnix set(1) SYNOPSIS |
Standards
- POSIX: set is not a POSIX.1-2024 utility, according to the bundle header.
- Solnix: The bundle text shows no STANDARDS or ATTRIBUTES section for this page.
- FreeBSD: The index page states no standards conformance.
Writing portable scripts
- Use export in sh/ksh and setenv in csh. Do not assume a shell has the other. The FreeBSD index shows export only in sh and setenv only in csh.
- Treat set
-ooption names and set-Cas ksh features on Solnix, because the Solnix sh section lists neither. Check the target shell's own manual before using them in/bin/shscripts.
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.