lpq(1b) on Solnix vs Linux and the BSDs

On Solnix, lpq is the illumos BSD-compatibility print queue viewer at /usr/bin/lpq. It talks to the print service found through the name service switch printers database, not to lpd's spool directory. It has no -a, and it adds a + interval option that the BSD pages do not have.

What Solnix runs

A default Solnix system runs the illumos lpq at /usr/bin/lpq. The page SYNOPSIS names /usr/ucb/lpq, which is also shipped. The bundle does not say how the two paths differ. The page is the section 1B (BSD-compatible) page.

Differences

Compared withTopicWhat differs
FreeBSD, OpenBSD, NetBSD-a (all printers)The Solnix synopsis has no -a. On FreeBSD, OpenBSD and NetBSD, -a reports on the local queues of all printers, not just one. A script that uses lpq -a fails on Solnix.
Source: FreeBSD lpq(1) -a; OpenBSD lpq(1) -a; NetBSD lpq(1) -a; Solnix lpq(1b) SYNOPSIS and OPTIONS
FreeBSD, OpenBSD, NetBSD-l meaningSolnix lpq -l adds the name of the host the print request came from. On the BSDs, -l prints information about each of the files that make up a job.
Source: Solnix lpq(1b) -l; FreeBSD lpq(1) -l; OpenBSD lpq(1) -l; NetBSD lpq(1) -l
FreeBSD, OpenBSD, NetBSDrepeat display with +Solnix lpq accepts + [interval]. It redisplays the queue every interval seconds, clears the screen each time, and stops when the queue is empty. Without an interval it runs once. The BSD pages document no such operand.
Source: Solnix lpq(1b) SYNOPSIS, + [interval]; FreeBSD/OpenBSD/NetBSD lpq(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSD-P destination namesSolnix -P takes a destination as an atomic name, a URI-style name (scheme://endpoint) or a POSIX-style name (server:destination), and also accepts a class of printers. The BSD pages describe -P only as a printer name.
Source: Solnix lpq(1b) -P; FreeBSD lpq(1) -P; OpenBSD lpq(1) -P; NetBSD lpq(1) -P
FreeBSD, OpenBSD, NetBSDdefault printer and PRINTERThe BSD pages say the default line printer is used, or the value of the PRINTER environment variable. The Solnix page has no ENVIRONMENT section and does not say how the default printer is chosen. It points to the printers database for destination lookup.
Source: FreeBSD lpq(1) ENVIRONMENT, -P; OpenBSD lpq(1) ENVIRONMENT; NetBSD lpq(1) ENVIRONMENT; Solnix lpq(1b) DESCRIPTION (last paragraph)
FreeBSD, OpenBSD, NetBSDqueue source and print serviceThe BSD lpq examines the spooling area used by lpd(8), and lpc(8) can restart the daemon if lpq warns that none is present. The Solnix page refers to the printers database in the name service switch and says that with IPP it may prompt for a passphrase.
Source: FreeBSD/OpenBSD/NetBSD lpq(1) DESCRIPTION; Solnix lpq(1b) DESCRIPTION, NOTES
NetBSD-w maxwaitNetBSD lpq -w sets the maximum time in seconds to wait for remote responses, default 300 seconds. Solnix lpq has no -w.
Source: NetBSD lpq(1) -w; Solnix lpq(1b) SYNOPSIS
OpenBSDCOLUMNSOpenBSD lpq formats output to the width in COLUMNS, otherwise to the terminal width, or 80 columns when output is not a terminal. The Solnix page documents no COLUMNS handling and says only that one line's worth of information is shown.
Source: OpenBSD lpq(1) ENVIRONMENT; Solnix lpq(1b) DESCRIPTION
FreeBSD, OpenBSD, NetBSDexit statusSolnix documents exit 0 for success and non-zero for an error. The FreeBSD, OpenBSD and NetBSD pages have no exit status section.
Source: Solnix lpq(1b) EXIT STATUS; FreeBSD/OpenBSD/NetBSD lpq(1) (no EXIT STATUS section)

Standards

  • POSIX: lpq is not a POSIX.1-2024 utility.
  • Solnix: Interface Stability: Standard.
  • FreeBSD: HISTORY: a lpq utility appeared in 3BSD. The page has no STANDARDS section.
  • OpenBSD: HISTORY: lpq appeared in 3BSD. The page has no STANDARDS section.
  • NetBSD: HISTORY: lpq appeared in 3BSD. The page has no STANDARDS section.

Writing portable scripts

  • Use only -P and -l, and do not rely on their details: -a, -w and the + interval operand each exist on only some systems, and -l output differs.
  • Pass -P explicitly. The Solnix page does not document a PRINTER variable, and -P accepts different destination forms on Solnix than on the BSDs.

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.