lp(1) on Solnix vs Linux and the BSDs
On Solnix, lp is the illumos lp at /usr/bin/lp, which submits requests to the LP print service or to IPP and BSD-protocol destinations. FreeBSD and NetBSD lp is a thin front-end that runs lpr(1) and has far fewer options. -o, which the BSDs accept but do not support, passes real printer options on Solnix.
The manual pages
- Solnix: lp(1) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: lp(1) 15.1-RELEASE
- NetBSD: lp(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
lp
What Solnix runs
A default Solnix system runs the illumos lp at /usr/bin/lp. No other variants are shipped. Destinations are looked up in the "printers" database of the name service switch (nsswitch.conf(5), printers(5), printers.conf(5)). The bundle text is trimmed, so the full option list and the environment, exit status and standards sections of the Solnix page are not visible.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD, NetBSD | -o printer options | On Solnix, -o passes printer-dependent options (key=value, [no]key) to the backend print service, such as nobanner, nofilebreak, length=. On FreeBSD and NetBSD, -o is accepted but not supported and exists only for SVR compatibility.Source: Solnix lp(1) -o; FreeBSD lp(1) -o; NetBSD lp(1) -o |
| FreeBSD, NetBSD | -s meaning | The Solnix -s is listed in the synopsis, but the visible text does not describe it. On FreeBSD it is silent operation, which is not supported and kept only for SUSv2 compatibility. On NetBSD it is described as silent operation.Source: Solnix lp(1) SYNOPSIS; FreeBSD lp(1) -s; NetBSD lp(1) -s |
| FreeBSD, NetBSD | modifying a queued request | Solnix has a second form, lp -i request-ID, that changes options of an existing request. It works for the LP print service in a local queue, and for remote IPP services that support job modification. A request already finished is rejected. FreeBSD and NetBSD lp have no -i.Source: Solnix lp(1) SYNOPSIS, DESCRIPTION, -i; FreeBSD lp(1) SYNOPSIS; NetBSD lp(1) SYNOPSIS |
| FreeBSD, NetBSD | implementation | FreeBSD and NetBSD lp is a front-end that invokes lpr(1) with the proper arguments. The Solnix page describes lp as submitting print requests to a destination through the LP print service or IPP, and does not mention lpr. Source: FreeBSD lp(1) DESCRIPTION; NetBSD lp(1) DESCRIPTION; Solnix lp(1) DESCRIPTION |
| FreeBSD, NetBSD | choosing the default printer | FreeBSD and NetBSD take the destination from -d, then from the LPDEST variable, then from PRINTER. The visible Solnix text only says -d sets the destination and does not mention LPDEST or PRINTER.Source: FreeBSD lp(1) -d, ENVIRONMENT; NetBSD lp(1) -d, ENVIRONMENT; Solnix lp(1) -d |
| FreeBSD, NetBSD | destination names | Solnix -d accepts a printer or a class of printers, written as an atomic name, a URI-style name (scheme://endpoint) or a POSIX-style name (server:destination). The BSD pages describe -d only as a particular printer.Source: Solnix lp(1) -d; FreeBSD lp(1) -d; NetBSD lp(1) -d |
| FreeBSD, NetBSD | extra Solnix options | Solnix lp has -f (form), -H (hold, resume, immediate), -P (page list), -q (priority), -S (character set or print wheel), -T (content type, with -r), -y (mode list) and -p. FreeBSD and NetBSD have none of these.Source: Solnix lp(1) SYNOPSIS; FreeBSD lp(1) SYNOPSIS; NetBSD lp(1) SYNOPSIS |
| NetBSD | -m and -t | Solnix and FreeBSD lp have -m (send mail after printing) and -t title. The NetBSD synopsis and option list have neither.Source: Solnix lp(1) -m, SYNOPSIS -t; FreeBSD lp(1) -m, -t; NetBSD lp(1) SYNOPSIS |
| FreeBSD, NetBSD | -c semantics | On Solnix, without -c the file is linked, not copied, so changes made before printing may show in the output. With -c it is copied. On FreeBSD and NetBSD, -c makes lp exit only once the files are no longer needed.Source: Solnix lp(1) -c; FreeBSD lp(1) -c; NetBSD lp(1) -c |
Standards
- POSIX: lp is a POSIX.1-2024 utility.
- FreeBSD: The lp command is expected to comply with the IEEE Std 1003.2 (“POSIX.2”) specification.
- NetBSD: The lp command is expected to comply with the IEEE Std 1003.2 (“POSIX.2”) specification.
Writing portable scripts
- Stick to
-c,-d,-nand file arguments in portable scripts. Treat-oas non-portable, since it works on Solnix but is a no-op on FreeBSD and NetBSD. - Pass the printer with
-dexplicitly. The visible Solnix text does not document LPDEST or PRINTER, which the BSD pages rely on.
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.