cal(1) on Solnix vs Linux and the BSDs
On Solnix, cal is the illumos cal at /usr/bin/cal. Its synopsis is only cal [ [month] year ], with no options at all. Scripts that use -y, -j, -3, -m, -h or a month name will fail or behave differently, because Linux and the BSDs all add options.
The manual pages
- Solnix: cal(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: cal(1) util-linux-2.42.3
- FreeBSD: cal(1) 15.1-RELEASE
- OpenBSD: cal(1) 8.0
- NetBSD: cal(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
cal
What Solnix runs
A default Solnix system runs the illumos cal at /usr/bin/cal. No other variants are shipped. It is not the util-linux cal that Linux uses, and it is not the FreeBSD cal/ncal pair.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | no options | Solnix cal takes no options: the synopsis is cal [ [month] year ]. Linux, FreeBSD, OpenBSD and NetBSD all document options such as -j and -y. An invocation like cal -y or cal -j is not described by the Solnix page.Source: Solnix cal(1) SYNOPSIS; Linux cal(1) OPTIONS; FreeBSD cal(1) SYNOPSIS; OpenBSD cal(1) SYNOPSIS; NetBSD cal(1) SYNOPSIS |
| Linux, FreeBSD, OpenBSD | month names | Solnix month must be a decimal integer from 1 to 12. Linux, FreeBSD and OpenBSD also accept a month name or abbreviation, and a single month-name argument. NetBSD documents only numeric months (1 - 12). Source: Solnix cal(1) OPERANDS month; Linux cal(1) DESCRIPTION; FreeBSD cal(1) DESCRIPTION; OpenBSD cal(1) DESCRIPTION; NetBSD cal(1) DESCRIPTION |
| Linux, FreeBSD, OpenBSD | -m meaning | Solnix has no -m. On Linux and OpenBSD, -m makes Monday the first day of the week. On FreeBSD, -m month selects a month, and Monday-first is -M. NetBSD has no -m; it uses -d day-of-week (0-6).Source: Linux cal(1) -m, --monday; OpenBSD cal(1) -m; FreeBSD cal(1) -m, -M; NetBSD cal(1) -d; Solnix cal(1) SYNOPSIS |
| Linux, FreeBSD, NetBSD | -h meaning | Solnix has no -h. On Linux, -h prints help and exits. On FreeBSD it toggles highlighting of today. On NetBSD it highlights the current day. OpenBSD has no -h.Source: Linux cal(1) -h, --help; FreeBSD cal(1) -h; NetBSD cal(1) -h; OpenBSD cal(1) SYNOPSIS |
| all four | Julian day numbers (-j) | Solnix has no -j to number days from January 1. Linux, FreeBSD, OpenBSD and NetBSD all provide -j for day-of-year numbering.Source: Linux cal(1) -j; FreeBSD cal(1) -j; OpenBSD cal(1) -j; NetBSD cal(1) -j; Solnix cal(1) SYNOPSIS |
| Linux, FreeBSD, NetBSD | several months and whole-year flags | Solnix cal shows one month, or a whole year when the year operand is given alone. Linux has -3, -n, -S and -Y; FreeBSD has -3, -A, -B; NetBSD has -3, -A, -B, -C to show surrounding months.Source: Solnix cal(1) DESCRIPTION; Linux cal(1) -3, -n, -S, -Y; FreeBSD cal(1) -3, -A, -B; NetBSD cal(1) -3, -A, -B, -C |
| all four | Julian/Gregorian switch | Solnix NOTES say September 1752 looks unusual because 11 days were skipped, and the page offers no way to change the switch date. Linux has --reform, FreeBSD ncal has -s country_code, and NetBSD has -R reform-spec. OpenBSD documents no way to change it.Source: Solnix cal(1) NOTES; Linux cal(1) --reform; FreeBSD cal(1) -s; NetBSD cal(1) -R; OpenBSD cal(1) DESCRIPTION |
| Linux | operand forms | Solnix accepts at most [month] year. Linux also accepts a leading day operand ([[day] month] year) and a timestamp or month name as a single argument. Source: Solnix cal(1) SYNOPSIS; Linux cal(1) SYNOPSIS |
| NetBSD | single-argument ISO form | On NetBSD a single parameter can be year and month in ISO format, as in cal 2007-12. The Solnix page documents a single operand only as the year. Source: NetBSD cal(1) DESCRIPTION; Solnix cal(1) DESCRIPTION and OPERANDS |
| Linux, FreeBSD | week numbers, Easter, vertical layout | Solnix cal has no week numbers, Easter dates or vertical layout. FreeBSD ncal adds -w and -e/-o (Easter). OpenBSD cal -w prints week numbers. Linux has -w and -v, which is ncal-style output.Source: FreeBSD cal(1) -w, -e, -o; OpenBSD cal(1) -w; Linux cal(1) -w, -v; Solnix cal(1) SYNOPSIS |
| FreeBSD | current date and TZ | The Solnix page says TZ determines the timezone used to calculate the current month. FreeBSD says month and year default to the system clock and time zone. The other counterpart pages do not say. Source: Solnix cal(1) ENVIRONMENT VARIABLES (TZ); FreeBSD cal(1) DESCRIPTION |
Standards
- POSIX: cal is a POSIX.1-2024 utility.
- Solnix: Interface Stability: Standard.
- FreeBSD: cal is compliant with the X/Open System Interfaces option of IEEE Std 1003.1-2008 (“POSIX.1”). The flags [
-3ehJMopwy], and a month name as a single argument, are extensions. - OpenBSD: cal is compliant with the X/Open System Interfaces option of the specification. The flags [
-jmwy], and a month name as a single argument, are extensions.
Writing portable scripts
- Use only cal [[month] year] with a numeric month and a fully written four-digit year; every system in the bundle accepts that form.
- Avoid cal options in portable scripts:
-m,-hand-jdiffer in meaning across systems or are missing on Solnix.
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.