lpadmin(8)
๐ lpadmin โ the CUPS printer-wrangling glow-up ๐
okay bestie, this is lpadmin(8) from the OpenPrinting girlies โ it's the command that sets up and edits your printer and class queues in CUPS. Think of it as the group chat admin tools for your print server. Let's go โจ
๐ธ SYNOPSIS ๐ธ
lpadmin [ -E ] [ -U username ] [ -h server[:port] ] -d destination
lpadmin [ -E ] [ -U username ] [ -h server[:port] ] -p destination [ -R
name-default ] option(s)
lpadmin [ -E ] [ -U username ] [ -h server[:port] ] -x destination
๐ฆ DESCRIPTION ๐ฆ
So basically lpadmin configures printer and class queues provided by CUPS. It can also be used to set the server default printer or class. two jobs, one icon ๐
When you put the -E option before the -d, -p, or -x options, it forces encryption when connecting to the server. yes queen, secure the connection ๐
The first form of the command (-d) sets the default printer or class to destination. Any print jobs you send later with the lp(1) or lpr(1) commands will land on this destination, unless the user says otherwise using the lpoptions(1) command. main character destination energy ๐
The second form of the command (-p) configures the named printer or class. All those extra options? They're described down below, keep scrolling bestie โฌ๏ธ
The third form of the command (-x) deletes the printer or class destination. Heads up though โ any jobs that are pending for the destination will be removed and any job that is currently printed will be aborted. it's giving "yeet and don't look back" ๐
โจ OPTIONS โจ
The following options are recognized when configuring a printer queue:
-c classโ Adds the named printer to class. If class doesn't exist yet, it's created automatically. no invite needed, it just shows up ๐-m modelโ Sets a standard PPD file for the printer from the model directory, or using one of the driver interfaces. Pro tip: use the-moption together with thelpinfo(8)command to get a list of supported models. The model"raw"clears any existing PPD file, and the model"everywhere"queries the printer referred to by the specified IPP device-uri. > Note: Models other than"everywhere"are deprecated and will not be supported in a future version of CUPS. so "everywhere" is the only one still on the VIP list ๐ญ-o cupsIPPSupplies=true-o cupsIPPSupplies=falseโ Specifies whether IPP supply level values should be reported.-o cupsSNMPSupplies=true-o cupsSNMPSupplies=falseโ Specifies whether SNMP supply level (RFC 3805) values should be reported.-o job-k-limit=valueโ Sets the kilobyte limit for per-user quotas. The value is an integer number of kilobytes; one kilobyte is 1024 bytes. math is math ๐งฎ-o job-page-limit=valueโ Sets the page limit for per-user quotas. The value is the integer number of pages that can be printed; double-sided pages are counted as two pages. yes, both sides count, no cheating ๐-o job-quota-period=valueโ Sets the accounting period for per-user quotas. The value is an integer number of seconds; 86,400 seconds are in one day. (that's one whole rotation of the earth, iconic โญ)-o job-sheets-default=banner-o job-sheets-default=banner,bannerโ Sets the default banner page(s) to use for print jobs.-o name=valueโ Sets a PPD option for the printer. You can list PPD options using the-loption with thelpoptions(1)command.-o name-default=valueโ Sets a default server-side option for the destination. Any print-time option can be defaulted, e.g.,"-o number-up-default=2"to set the default"number-up"option value to 2. setting defaults is self-care fr fr ๐-o port-monitor=nameโ Sets the binary communications program to use when printing:"none","bcp", or"tbcp". The default program is"none". The specified port monitor must be listed in the printer's PPD file. no PPD entry, no service โ-o printer-error-policy=nameโ Sets the policy for errors such as printers that cannot be found or accessed, don't support the format being printed, fail during submission of the print data, or cause one or more filters to crash. The name must be one of"abort-job"(abort the job on error),"retry-job"(retry the job at a future time),"retry-current-job"(retry the current job immediately), or"stop-printer"(stop the printer on error). The default error policy is"stop-printer"for printers and"retry-current-job"for classes. pick your chaos response wisely ๐-o printer-is-shared=true-o printer-is-shared=falseโ Sets the destination to shared/published or unshared/unpublished. Shared/published destinations are publicly announced by the server on the LAN based on the browsing configuration incupsd.conf, while unshared/unpublished destinations are not announced. The default value is"true". so by default, everyone on the LAN knows about your printer. social butterfly behavior ๐-o printer-op-policy=nameโ Sets the IPP operation policy associated with the destination. The name must be defined in thecupsd.confin aPolicysection. The default operation policy is"default".-R name-defaultโ Deletes the named option from printer. bye bye option ๐-r classโ Removes the named printer from class. If the resulting class becomes empty, it is removed. ghosted and also deleted ๐-u allow:{user|@group}{,user|,@group}*โ Sets user-level access control on a destination. Names starting with"@"are interpreted as UNIX groups.-u deny:{user|@group}{,user|,@group}*โ same shape, deny flavor.-u allow:all-u deny:noneโ The latter two forms turn user-level access control off. > Note: The user'root'is not granted special access โ using"-u allow:foo,bar"will allow users'foo'and'bar'to access the printer but NOT'root'. no special treatment for root, we love equality ๐ซถ-v "device-uri"โ Sets the device-uri attribute of the printer queue. Use the-voption with thelpinfo(8)command to get a list of supported device URIs and schemes.-D "info"โ Provides a textual description of the destination.-Eโ When specified before the-d,-p, or-xoptions, forces the use of TLS encryption on the connection to the scheduler. Otherwise, it enables the destination and accepts jobs; this is the same as running thecupsaccept(8)andcupsenable(8)programs on the destination. (yes, one flag, two personalities โ see NOTES, we'll get to that ๐ญ)-L "location"โ Provides a textual location of the destination.
๐ DEPRECATED OPTIONS ๐
The following lpadmin options are deprecated (read: on their way out, do not get attached):
-i filenameโ This option historically has been used to provide either a System V interface script or (as an implementation side-effect) a PPD file. > Note: Interface scripts are not supported by CUPS. PPD files and printer drivers are deprecated and will not be supported in a future version of CUPS.-P ppd-fileโ Specifies a PostScript Printer Description (PPD) file to use with the printer. > Note: PPD files and printer drivers are deprecated and will not be supported in a future version of CUPS.
๐ CONFORMING TO ๐
Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#". Also, printer and class names are not case-sensitive. freedom of naming, with boundaries โจ
Finally, the CUPS version of lpadmin may ask the user for an access password depending on the printing system configuration. This differs from the System V version which requires the root user to execute this command. no root required, we're modern here ๐
๐ NOTES ๐
CUPS printer drivers and backends are deprecated and will no longer be supported in a future feature release of CUPS. Printers that do not support IPP can be supported using applications such as ippeveprinter(1).
The CUPS version of lpadmin does not support all of the System V or Solaris printing system configuration options. so don't come in expecting every flag from 1994, bestie ๐
Interface scripts are not supported for security reasons. ๐
The double meaning of the -E option is an unfortunate historical oddity. (we don't talk about it. it's giving trauma ๐ญ)
The lpadmin command communicates with the scheduler (cupsd) to make changes to the printing system configuration. This configuration information is stored in several files including printers.conf and classes.conf. > These files should not be edited directly and are an implementation detail of CUPS that is subject to change at any time. hands off the config files, they're not yours, they never were โ๐
๐ EXAMPLE ๐
Create an IPP Everywhere print queue:
lpadmin -p myprinter -E -v ipp://myprinter.local/ipp/print -m everywhere
look at that. one line. a whole printer. slay โญ
๐ฅ SEE ALSO ๐ฅ
cupsaccept(8), cupsenable(8), lpinfo(8), lpoptions(1), CUPS Online Help (http://localhost:631/help)
๐ COPYRIGHT ๐
Copyright ยฉ 2020-2024 by OpenPrinting.
and that's the whole page, bestie ๐ซถ this was CUPS's lpadmin(8) manual, dated 2021-02-28 โ the OpenPrinting girlies really said "configure your printers, but make it documented." go forth and print ๐๐จ๏ธโจ
๐ฆ where this page comes from
- alpine 3.22: cups-doc 2.4.18-r0 ยท Apache-2.0
- alpine 3.23: cups-doc 2.4.18-r0 ยท Apache-2.0
- alpine 3.24: cups-doc 2.4.19-r1 ยท Apache-2.0
- centos-stream 10: cups 1:2.4.10-18.el10 ยท Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- debian trixie: cups-client 2.4.10-3+deb13u1 ยท Apache-2.0-with-GPL2-LGPL2-Exception
- debian trixie: cups-client 2.4.10-3+deb13u2 ยท Apache-2.0-with-GPL2-LGPL2-Exception
- fedora 43: cups 1:2.4.14-2.fc43 ยท Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- fedora 43: cups 1:2.4.19-3.fc43 ยท Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- fedora 44: cups 1:2.4.16-7.fc44 ยท Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- fedora 44: cups 1:2.4.19-3.fc44 ยท Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- nixpkgs unstable: cups 2.4.19
- opensuse-leap 16.0: cups-client 2.4.19-160000.2.1 ยท Apache-2.0
- opensuse-leap 16.0: cups-client 2.4.19-160000.2.1 ยท Apache-2.0
- opensuse-leap 16.0: cups-client 2.4.19-160000.2.1 ยท Apache-2.0
- opensuse-leap 16.0: cups-client 2.4.19-160000.2.1 ยท Apache-2.0
- ubuntu questing: cups-client 2.4.12-0ubuntu3
- ubuntu questing: cups-client 2.4.12-0ubuntu3.10
- ubuntu resolute: cups-client 2.4.16-1ubuntu1 ยท Apache-2.0-with-GPL2-LGPL2-Exception
- ubuntu resolute: cups-client 2.4.16-1ubuntu1.3 ยท Apache-2.0-with-GPL2-LGPL2-Exception
- ubuntu stonking: cups-client 2.4.16-1ubuntu3 ยท Apache-2.0-with-GPL2-LGPL2-Exception
- Copyright ยฉ 2020-2024 by OpenPrinting
- Copyright ยฉ 2007-2019 by Apple Inc
- Copyright ยฉ 1997-2006 by Easy Software Products
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms