runat(1) on Solnix vs Linux and the BSDs
On Solnix, runat is the illumos /usr/bin/runat. It runs a command, or an interactive shell, with the current directory set to a file's hidden extended-attribute directory. Only FreeBSD 15.1 has a counterpart page, and its runat differs in shell selection, exit status and directory creation.
The manual pages
- Solnix: runat(1) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: runat(1) 15.1-RELEASE
What Solnix runs
A default Solnix system runs the illumos runat at /usr/bin/runat. No other variants are shipped. The package is pkgs.solnix.illumos-world-man. See fsattr(7) for the extended attribute model.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD | interactive shell when no command is given | Solnix runat with only a file argument spawns an interactive shell, chosen by $SHELL and falling back to /bin/sh. The FreeBSD page documents no such behaviour. Its synopsis shows an optional shell command, but the page does not say what happens without one.Source: Solnix runat(1) DESCRIPTION, ENVIRONMENT VARIABLES (SHELL); FreeBSD runat(1) SYNOPSIS, DESCRIPTION |
| FreeBSD | SHELL variable | Solnix runat reads $SHELL to pick the interactive shell. The FreeBSD page lists no environment variables and says the command is run via sh(1). Source: Solnix runat(1) ENVIRONMENT VARIABLES; FreeBSD runat(1) DESCRIPTION |
| FreeBSD | exit status | Solnix runat returns 125 when the attribute directory cannot be accessed and 126 when exec of the command fails. Otherwise it returns the shell's exit status. The FreeBSD page documents no exit values. Source: Solnix runat(1) EXIT STATUS; FreeBSD runat(1) (no EXIT STATUS section) |
| FreeBSD | creating the attribute directory | FreeBSD runat creates an empty named attribute directory if the file has none. FreeBSD suggests pathconf(2) with _PC_HAS_NAMEDATTR to test without creating one. The Solnix page says the file need not be prepared, and does not say whether a directory is created. Source: FreeBSD runat(1) DESCRIPTION; Solnix runat(1) DESCRIPTION |
| FreeBSD | file argument is required | Solnix runat shows file as a required argument: /usr/bin/runat file [command]. The FreeBSD synopsis shows both file and shell command in brackets, as optional.Source: Solnix runat(1) SYNOPSIS; FreeBSD runat(1) SYNOPSIS |
| FreeBSD | pwd and shell caveats | On Solnix, the .. entry of the attribute directory is the file itself, which may not be a directory. So pwd may fail, and zsh and tcsh should not be used. The FreeBSD page does not mention these caveats. Source: Solnix runat(1) USAGE, NOTES; FreeBSD runat(1) DESCRIPTION |
| FreeBSD | related documentation | Solnix runat points to fsattr(7) for extended attributes. FreeBSD points to named_attribute(7) and describes fchdir(2) as the mechanism. Source: Solnix runat(1) USAGE, SEE ALSO; FreeBSD runat(1) DESCRIPTION, SEE ALSO |
| Linux, OpenBSD, NetBSD | no runat counterpart | The bundle has no runat page for Linux, OpenBSD or NetBSD, so the manual gives no equivalent command on those systems. Source: Bundle header: only a freebsd counterpart (runat(1) FreeBSD 15.1) |
Standards
- POSIX: runat is not a POSIX.1-2024 utility.
- Solnix: Interface Stability: Evolving. CSI: Enabled.
- FreeBSD: The page gives no STANDARDS section. HISTORY says runat first appeared in FreeBSD 15.0.
Writing portable scripts
- Do not rely on runat being present: only Solnix (illumos) and FreeBSD 15.0 or later document it in the bundle. Check with command
-vrunat first. - Always pass a command when scripting, and do not depend on pwd inside the attribute directory.
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.