last(1) on Solnix vs Linux and the BSDs
On Solnix, last is the illumos last at /usr/bin/last. It reads /var/adm/wtmpx and has only four options (-a, -l, -n, -f). The main trap for Linux and BSD users is that -l, -t, -d, -h and -s either are missing or mean something different, and there is no snapshot-time feature.
The manual pages
What Solnix runs
A default Solnix system runs the illumos last at /usr/bin/last. No other variants are shipped. The page's SEE ALSO points to utmpx(5) for the file format.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | default accounting file | Solnix last reads /var/adm/wtmpx. Linux and OpenBSD read /var/log/wtmp, FreeBSD reads /var/log/utx.log, and NetBSD reads /var/log/wtmpx or /var/log/wtmp. Pass -f only with a path that suits the system you are on.Source: Solnix last(1) DESCRIPTION, -f; Linux last(1) -f; FreeBSD last(1) -f; OpenBSD last(1) -f; NetBSD last(1) -f |
| Linux | -l meaning | Solnix -l shows timestamps with seconds and years. On Linux, -l allows usernames longer than 8 characters. Linux uses -F for full login and logout times.Source: Solnix last(1) -l; Linux last(1) -l, -F |
| FreeBSD, OpenBSD, NetBSD | -l and longer timestamps | FreeBSD, OpenBSD and NetBSD have no -l. For more detailed times they use different flags: FreeBSD -y (year) and -w (seconds in the duration), OpenBSD -T (seconds), NetBSD -T (year and seconds).Source: Solnix last(1) -l; FreeBSD last(1) -y, -w; OpenBSD last(1) -T; NetBSD last(1) -T |
| all four | -t meaning and tty selection | Solnix has no -t. You name users and terminals as plain arguments: last root console. On Linux, -t YYYYMMDDHHMMSS shows login state at a given time. On FreeBSD, OpenBSD and NetBSD, -t tty selects a terminal.Source: Solnix last(1) SYNOPSIS [name | tty]; Linux last(1) -t; FreeBSD last(1) -t; OpenBSD last(1) -t; NetBSD last(1) -t |
| FreeBSD, OpenBSD | snapshot of who was logged in | FreeBSD and OpenBSD -d date lists users logged in at that date and time. When -d is given, all options except -f and -n are ignored. The Solnix page documents no equivalent.Source: FreeBSD last(1) -d; OpenBSD last(1) -d; Solnix last(1) OPTIONS |
| Linux | -d meaning | Linux -d translates a remote host's stored IP number back into a hostname. Solnix has no -d. Solnix -a only prints the hostname in the last column.Source: Linux last(1) -d, -a; Solnix last(1) -a |
| FreeBSD, OpenBSD, NetBSD | host filter -h | FreeBSD, OpenBSD and NetBSD -h host restricts output to a host, given as a name or internet number. Solnix has no -h. Its -a only displays the hostname column.Source: FreeBSD last(1) -h; OpenBSD last(1) -h; NetBSD last(1) -h; Solnix last(1) -a |
| FreeBSD, OpenBSD | -s meaning | Solnix has no -s. FreeBSD -s reports session duration in seconds. OpenBSD -s shows time values as seconds since the Epoch instead of formatted dates.Source: FreeBSD last(1) -s; OpenBSD last(1) -s; Solnix last(1) OPTIONS |
| NetBSD | -n is overloaded | Solnix -n number limits the number of entries. NetBSD documents -n twice: as a line limit, and as 'print host addresses numerically' (wtmpx entries only). Solnix -number is a transition form that the page says will be removed.Source: Solnix last(1) -n number|-number; NetBSD last(1) SYNOPSIS and -n |
| Linux | lastb and extra flags | Linux ships lastb, which reads /var/log/btmp for bad login attempts, and has -x for shutdown and run-level entries. The Solnix page documents neither lastb nor -x.Source: Linux last(1) lastb, -x; Solnix last(1) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | extra BSD-only options | OpenBSD -c prints total time after the output. FreeBSD --libxo emits structured output. NetBSD -f - reads standard input, and -H, -L and -N set column widths. The Solnix page documents none of these.Source: OpenBSD last(1) -c; FreeBSD last(1) --libxo; NetBSD last(1) -f, -H, -L, -N; Solnix last(1) OPTIONS |
Standards
- POSIX: last is not a POSIX.1-2024 utility.
Writing portable scripts
- Only name users and ttys as plain arguments for portable use. Avoid
-l,-t,-d,-h,-sand-T: they are missing or mean different things across Solnix, Linux and the BSDs. - Do not hard-code the accounting file. Pass
-fonly after choosing the path per OS (/var/adm/wtmpxon Solnix,/var/log/wtmpon Linux and OpenBSD,/var/log/utx.logon FreeBSD).
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.