Linux Commands: Line printer control program
- Line printer control program
Syntax: ls [Options]... [File]...
Description: The lpc(8) program is used to control the printers that lpd serves. you can enable or disable a printer or its queues, rearrange entries within a queue, and get a status report on the printers and their queues. Lpc is mostly used in a setup where there are multiple printers hanging off one machine.
The above will start the lpc program. By default, this enters you into an interactive mode, and you can begin issuing commands. The other option is to issue an lpc command on the command line.
$ lpc status all
A list of the available commands are in the lpd man page, but here are a few of the major commands you'll want to know about. Any commands marked with option can either be a printer name (lp, print, etc) or the keyword all, which means all printers.
- disable option - prevents any new printer job from being entered
- down option - disables all printing on the printer
- enable option - allow new jobs to enter the print queue
- quit (or exit) - leave lpc
- restart option - restarts lpd for that printer
- status option - print status of printer
- up option - enable everything and start a new lpd
Related: lpr, lprint, lprintd / lpd(8), lprintq / lpq(1), lprm, printcap(5)
Other Linux Commands: