sleep(1) on Solnix vs Linux and the BSDs

On Solnix, sleep is the illumos /usr/bin/sleep. It accepts one time operand with an optional single suffix (s, m, h, d, w, y), including w and y, which no counterpart page lists. Unlike Linux and FreeBSD, it takes only one operand and does not add several intervals together.

What Solnix runs

A default Solnix system runs the illumos sleep at /usr/bin/sleep. No other variants are shipped. The Solnix page says suffix use is generally not portable to other systems.

Differences

Compared withTopicWhat differs
Linux, FreeBSDmultiple operandsLinux and FreeBSD sleep accept several intervals and pause for their sum. The Solnix synopsis shows a single time[suffix] operand and the page does not describe summing, so 'sleep 1m 30s' is not documented to work.
Source: Solnix sleep(1) SYNOPSIS; Linux sleep(1) SYNOPSIS, DESCRIPTION; FreeBSD sleep(1) SYNOPSIS, DESCRIPTION
Linux, FreeBSDw and y suffixesSolnix accepts the suffixes w (weeks) and y (years) as well as s, m, h and d. Linux and FreeBSD list only s, m, h and d.
Source: Solnix sleep(1) DESCRIPTION (suffix list); Linux sleep(1) DESCRIPTION; FreeBSD sleep(1) DESCRIPTION
OpenBSD, NetBSDsuffixes not supportedOpenBSD and NetBSD document only a seconds operand and no unit suffixes. A script using 'sleep 5m' or 'sleep 2h' written for Solnix is not documented to work there.
Source: OpenBSD sleep(1) SYNOPSIS; NetBSD sleep(1) SYNOPSIS; Solnix sleep(1) DESCRIPTION
FreeBSD, OpenBSD, NetBSDhexadecimal and infinity operandsSolnix says the operand may be decimal or hexadecimal, and that Inf or infinity are honored. FreeBSD says intervals may use any form allowed by strtod(3). OpenBSD requires a non-negative decimal value. The NetBSD page mentions only integer and fractional seconds.
Source: Solnix sleep(1) DESCRIPTION; FreeBSD sleep(1) DESCRIPTION; OpenBSD sleep(1) DESCRIPTION; NetBSD sleep(1) DESCRIPTION
FreeBSDSIGALRMOn Solnix, SIGALRM ends the sleep and sleep exits 0. FreeBSD does not handle SIGALRM specially, so it takes the standard action.
Source: Solnix sleep(1) DESCRIPTION, EXIT STATUS; FreeBSD sleep(1) IMPLEMENTATION NOTES
Linux, OpenBSDSIGALRMThe Solnix page documents SIGALRM as ending the sleep with status 0. The Linux and OpenBSD pages do not mention SIGALRM.
Source: Solnix sleep(1) DESCRIPTION, EXIT STATUS; Linux sleep(1); OpenBSD sleep(1)
NetBSDSIGALRMSolnix and NetBSD both exit 0 when SIGALRM is received.
Source: Solnix sleep(1) EXIT STATUS; NetBSD sleep(1) EXIT STATUS
FreeBSD, NetBSDSIGINFOFreeBSD and NetBSD print an estimate of the seconds left to sleep on standard output when SIGINFO arrives. The Solnix page documents no SIGINFO behaviour.
Source: FreeBSD sleep(1) DESCRIPTION; NetBSD sleep(1) DESCRIPTION; Solnix sleep(1) Signals
LinuxoptionsLinux sleep documents --help and --version. The Solnix synopsis has no options.
Source: Linux sleep(1) SYNOPSIS, DESCRIPTION; Solnix sleep(1) SYNOPSIS
NetBSDlong sleepsNetBSD ignores fractional seconds for requests of much more than about 2.5 hours, and fails on durations beyond about 250 billion years. The Solnix page documents no such limits.
Source: NetBSD sleep(1) DESCRIPTION, BUGS; Solnix sleep(1) DESCRIPTION
FreeBSDzero or negative totalFreeBSD sleep exits immediately if the final sum is zero or negative. The Solnix page says the operand is a non-negative number and does not say what happens otherwise.
Source: FreeBSD sleep(1) DESCRIPTION; Solnix sleep(1) DESCRIPTION

Standards

  • POSIX: sleep is a POSIX.1-2024 utility.
  • Solnix: Interface Stability: Committed.
  • FreeBSD: Expected to be IEEE Std 1003.2 (“POSIX.2”) compatible. Non-integer intervals, units other than seconds and multiple intervals are non-portable extensions first introduced in GNU sh-utils 2.0a.
  • OpenBSD: Compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. Support for fractional seconds is an extension.
  • NetBSD: Expected to be IEEE Std 1003.2 (“POSIX.2”) compatible. Non-integral delays are a non-portable extension.

Writing portable scripts

  • Pass a plain integer number of seconds, with no suffix, fraction or hex. That is the only form all five pages document.
  • Do not rely on several operands being summed or on suffixes such as m, h, w or y. For longer waits, give the total in seconds, for example sleep 90 instead of sleep 1m 30s.

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.