lpstat(1)

πŸ’– lpstat(1) β€” the OpenPrinting girlies' guide to peeking at ur printers πŸ’–

okay bestie, so lpstat lives in section 1 of the manual (that's the "user commands" section, iykyk) and it's brought to you by OpenPrinting. she's the friend who always knows what's going on with the printer queue. iconic.


✨ NAME ✨

lpstat β€” print cups status information 🫢


🌸 SYNOPSIS 🌸

lpstat [ -h hostname[:port] ] [ -E ] [ -H ] [ -U username ] [ -l ] [ -W
which-jobs ] [ -a [ destination(s) ] ] [ -c [ class(es) ] ] [ -d ] [ -e
] [ -o [ destination(s) ] ] [ -p [ printer(s) ] ] [ -r ] [ -R ] [ -s ] [
-t ] [ -u [ user(s) ] ] [ -v [ printer(s) ] ]

like yes it's a lot of brackets, no we're not scared, it's giving choose your own adventure πŸ’…


πŸ’… DESCRIPTION πŸ’…

lpstat shows u status info about the current classes, jobs, and printers. that's it, that's the job. she's the group chat's designated "is the printer working or is it being dramatic" correspondent.

and the cutest part? when u run it with no arguments at all, lpstat will list the active jobs queued by the current user. just u and ur own little queue. main character energy, honestly. ✨


πŸŽ€ OPTIONS πŸŽ€

the lpstat command supports the following options:

  • -E β€” forces encryption when connecting to the server. keep it private bestie, ur print jobs are not for the group chat πŸ”’
  • -H β€” shows the server hostname and port. like "where even is this thing" answered for u.
  • -R β€” shows the ranking of print jobs. who's first in line, who's waiting, the whole drama.
  • -U username β€” specifies an alternate username. not u, but u-adjacent πŸ‘€
  • -W which-jobs β€” specifies which jobs to show: "all", "successful", "completed" or "not-completed" (the default).
⚠️ okay this is important bestie: this option must appear before the -o option and/or any printer names, otherwise the default ("not-completed") value will be used in the request to the scheduler. order matters, periodt.
  • -a [printer(s)] β€” shows the accepting state of printer queues. if u don't specify any printers, then all printers get listed. no printers left behind 🫢
  • -c [class(es)] β€” shows the printer classes and the printers that belong to them. if no classes are specified, all classes are listed.
  • -d β€” shows the current default destination. the one she'd pick if u didn't pick.
  • -e β€” shows all available destinations on the local network. it's giving "who's around" πŸ”
  • -h server[:port] β€” specifies an alternate server.
⚠️ note: this option must occur before all others. she's gotta go first, she's the opener.
  • -l β€” shows a long listing of printers, classes, or jobs. the verbose version. the "tell me everything" version. πŸ’…
  • -o [destination(s)] β€” shows the jobs queued on the specified destinations. if no destinations are specified, all jobs are shown. chaos mode, lowkey.
  • -p [printer(s)] β€” shows the printers and whether they are enabled for printing. if no printers are specified then all printers are listed.
  • -r β€” shows whether the CUPS server is running. the "are u alive" check πŸ’€
  • -s β€” shows a status summary, including the default destination, a list of classes and their member printers, and a list of printers and their associated devices. this is equivalent to using the -d, -c, and -v options. the combo meal πŸ“
  • -t β€” shows all status information. this is equivalent to using the -r, -d, -c, -v, -a, -p, and -o options. the whole entire menu, no cap πŸ”₯
  • -u [user(s)] β€” shows a list of print jobs queued by the specified users. if no users are specified, it lists the jobs queued by the current user. (that's u. hi. πŸ‘‹)
  • -v [printer(s)] β€” shows the printers and what device they are attached to. if no printers are specified then all printers are listed. the "who's plugged into what" lore πŸ¦‹

🌈 CONFORMING TO 🌈

unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", and "#". so yes she's flexible, but those four are a hard no. also, printer and class names are not case-sensitive. PRINTER and printer are the same girl πŸ’…

the -h, -e, -E, -U, and -W options are unique to CUPS. exclusive, one of a kind, no one else has them ✨

the Solaris -f, -P, and -S options are silently ignored. like they get left on read. not an error, just... nothing. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

cancel(1), lp(1), lpq(1), lpr(1), lprm(1), CUPS Online Help (http://localhost:631/help)

the whole friend group fr fr 🫢


Copyright Β© 2020-2024 by OpenPrinting.


okay that's the whole page, and a lil sign-off for u: this manual page is dated 2022-05-02, it belongs to the CUPS manual suite, and it's page lpstat(1). go check ur queue bestie, u got this πŸ’–βœ¨πŸŽ€