On Unix-like operating systems, the lpadmin command configures the lp print service.
Description
lpadmin configures printer and class queues provided by the common printing system CUPS. It can also be used to set the server default printer or class.
- Description
- Syntax
- Examples
- Related commands
- Linux commands help
When specified before the -d, -p, or -x options, the -E option forces encryption when connecting to the server.
The first form of the command (-d) sets the default printer or class to destination. Subsequent print jobs submitted via the lp or lpr commands use this destination unless the user specifies otherwise with the lpoptions command.
The second form of the command (-p) configures the named printer or class. The additional options are described below.
The third form of the command (-x) deletes the printer or class destination. Any jobs that are pending for the destination will be removed and any job that is currently printed will be aborted.
Syntax
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
Options
The following options configure the printer queue.
Examples
lpadmin -p LaserJet -E -v socket://10.1.1.1 -m laserjet.ppd
Add a printer named Laserjet which is at the network location 10.1.1.1, using the CUPS driver file laserjet.ppd.
Related commands
enable — Enable and disable LP printers.lp — Print a file on the System V operating system.lpstat — List the status of the LP print services.mail — Read, compose, and manage mail.stty — Set options for your terminal display.