LinuxCommandLibrary

lpc

Control line printer devices

SYNOPSIS

lpc [command [arguments]]

PARAMETERS

abort printer
    Terminates an active job on the printer immediately and disables printing.

clean printer
    Removes all jobs from the specified printer queue.

disable printer
    Disables the specified printer, preventing new jobs from being queued.

down printer message
    Disables the specified printer and displays the given message when users attempt to print.

enable printer
    Enables the specified printer, allowing new jobs to be queued.

exit
    Exits the lpc program.

help [command]
    Displays help information for the specified command, or a list of available commands if no command is specified.

quit
    Exits the lpc program.

restart printer
    Attempts to restart the printer daemon (lpd) on the specified printer.

start printer
    Starts the specified printer, allowing it to process queued jobs.

status [printer]
    Displays the status of the specified printer or all printers if none is provided.

stop printer
    Stops the specified printer after the current job is completed.

topq printer job# [user]
    Move job to the top of the queue. First argument is job#.

up printer
    Enables printing and starts a new daemon, equivalent to 'enable' and 'start'.

DESCRIPTION

The lpc command provides a command-line interface to control line printers and printer queues managed by the line printer daemon (lpd).

It allows administrators to start, stop, restart, enable, disable, and rearrange print queues.

lpc can also display the status of printers and queues, including the number of jobs queued, the status of the printer daemon, and any error messages. It provides essential administrative functionality for managing printing resources on a Linux system.

Requires root privileges to execute most commands.

CAVEATS

lpc depends on the lpd printing system, which is often replaced by CUPS (Common Unix Printing System) in modern Linux distributions. Consequently, lpc might not be available or fully functional on systems using CUPS. The specific options and behavior may vary slightly depending on the implementation of lpd.

SECURITY

Executing lpc typically requires root privileges to modify printer configurations and control the printer daemon. Incorrect use can disrupt printing services for all users. It is important to understand the consequences of each command before execution.

HISTORY

lpc has been a part of the traditional BSD line printer system for many years.

It was developed to provide administrators with the tools to manage the printing environment.

With the rise of CUPS, lpc's usage has declined, but it remains relevant on systems still utilizing lpd.

SEE ALSO

lpq(1), lprm(1), lpr(1)

Copied to clipboard