script(1) on Solnix vs Linux and the BSDs
On Solnix, script is the illumos script at /usr/bin/script. It takes only -a and an optional file name. There is no -c, -q or -e, so a script that runs a command or captures its exit status under script on Linux or a BSD will not work.
The manual pages
What Solnix runs
A default Solnix system runs the illumos script at /usr/bin/script. /usr/ucb/script is also shipped, but the bundle does not describe it. The Solnix page documents only -a, a file argument, and the SHELL-based sub-shell.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, OpenBSD, NetBSD | -c command | Solnix script has no -c, so it cannot run a single command instead of an interactive shell. Linux, OpenBSD and NetBSD accept -c command. Linux also accepts the command after --.Source: Solnix script(1) SYNOPSIS (script [-a] [filename]); Linux script(1) -c; OpenBSD script(1) -c; NetBSD script(1) -c |
| FreeBSD | running a command | Solnix script has no way to give a command. FreeBSD takes the command as arguments after the file name (script [options] file command ...), and a command cannot be given without also naming the file. Source: Solnix script(1) SYNOPSIS; FreeBSD script(1) SYNOPSIS and BUGS |
| Linux, FreeBSD, NetBSD | exit status of the child | Solnix script documents no option and no rule for the child's exit status. Linux -e/--return returns the child's status. NetBSD -e exits with the shell-style status of the shell or command. On FreeBSD, -e is accepted but the exit status of script is always the child's.Source: Linux script(1) -e, --return; NetBSD script(1) -e; FreeBSD script(1) -e; Solnix script(1) OPTIONS |
| OpenBSD | exit status | OpenBSD script exits 0 unless a child process fails, in which case it returns 1. The Solnix page does not describe an exit status. Source: OpenBSD script(1) DESCRIPTION; Solnix script(1) DESCRIPTION |
| Linux, FreeBSD, NetBSD | quiet mode | Solnix script has no -q. Linux, FreeBSD and NetBSD -q suppress the start and done messages. The Solnix page does not say whether it prints such messages. OpenBSD has no -q either.Source: Linux script(1) -q, --quiet; FreeBSD script(1) -q; NetBSD script(1) -q; Solnix script(1) OPTIONS |
| Linux, FreeBSD, NetBSD | flush and live watching | Solnix has no flush option. Linux -f/--flush, FreeBSD -F and NetBSD -f flush output after each write. FreeBSD -f means something else: it creates a filemon(4) file.Source: Linux script(1) -f; FreeBSD script(1) -F, -f; NetBSD script(1) -f; Solnix script(1) OPTIONS |
| Linux, FreeBSD, NetBSD | timing and playback | Solnix script cannot record timing or play back a session. FreeBSD and NetBSD use -r to record and -p to play back. Linux logs timing with -T/--log-timing (or deprecated -t), replayed with scriptreplay(1).Source: FreeBSD script(1) -r, -p; NetBSD script(1) -r, -p; Linux script(1) DESCRIPTION, -T, -t; Solnix script(1) OPTIONS |
| Linux | separate input and output logs | Linux can log input (-I), output (-O) or both (-B) to separate files and can limit file size with -o. Solnix has none of these. Linux warns that input logging may capture passwords.Source: Linux script(1) -I, -O, -B, -o, DESCRIPTION; Solnix script(1) OPTIONS |
| FreeBSD | SCRIPT environment variable | FreeBSD adds SCRIPT, the typescript file name, to the sub-shell's environment. The Solnix page documents no environment variables, though it says the sub-shell follows $SHELL. Source: FreeBSD script(1) ENVIRONMENT (SCRIPT); Solnix script(1) DESCRIPTION |
| all four | SHELL fallback and ENVIRONMENT section | Linux, OpenBSD and NetBSD document the fallback when SHELL is unset as the Bourne shell. FreeBSD documents the POSIX shell. The Solnix page says the shell comes from $SHELL but does not say what is used when it is unset. Source: Linux script(1) ENVIRONMENT; OpenBSD script(1) ENVIRONMENT; NetBSD script(1) ENVIRONMENT; FreeBSD script(1) ENVIRONMENT; Solnix script(1) DESCRIPTION |
| all four | -a | -a appends to the file instead of overwriting it, and means the same on every system. The default file name is typescript everywhere.Source: Solnix script(1) -a; Linux script(1) -a; FreeBSD script(1) -a; OpenBSD script(1) -a; NetBSD script(1) -a |
Standards
- POSIX: script is not a POSIX.1-2024 utility.
- Solnix: The ATTRIBUTES section lists CSI as Enabled. The page gives no interface stability value.
Writing portable scripts
- Use only 'script [
-a] [file]' in portable scripts.-c,-q,-eand-fdiffer or are missing, and Solnix lacks them. - Do not rely on script's exit status or on running a command under it. Solnix documents neither, and the other systems differ.
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.