disable
Disable printers or classes
SYNOPSIS
disable [ -E ] [ -U username ] [ -c ] [ -h hostname[:port] ] [ -r reason ] printer
PARAMETERS
-E
Forces encryption when connecting to the CUPS server.
-U username
Specifies the username to authenticate with the CUPS server.
-c
Disables all printers on the CUPS server simultaneously.
-h hostname[:port]
Connects to a specific CUPS server at the given hostname and optional port.
-r reason
Provides a reason for disabling the printer, which is logged and visible to users.
printer
The name of the printer or class to be disabled. This is a mandatory argument.
DESCRIPTION
The disable command is a utility provided by the Common Unix Printing System (CUPS) for managing print queues on Linux and other Unix-like operating systems. Its primary function is to halt a specified printer or printer class from accepting any new print jobs. When a printer is disabled, any print jobs currently in its queue or actively being processed will continue to completion without interruption. However, no new jobs sent to this printer will be added to its queue; they will typically remain pending or report an error to the user depending on the client application's configuration. This command is an essential tool for system administrators to perform maintenance tasks, troubleshoot printer issues, or temporarily take a printer offline without losing existing print tasks. For instance, an administrator might disable a printer to replace toner, clear a paper jam, or install a driver update. To restore the printer's functionality and allow it to accept new jobs, the complementary enable command must be used. Proper use of disable requires administrative privileges, usually root access or membership in a CUPS administrative group, as it modifies the operational state of a system-wide service. It communicates directly with the CUPS daemon (cupsd) to update the printer's status.
CAVEATS
Administrative Privileges: This command typically requires root access or appropriate CUPS administrative permissions to modify printer states.
Existing Jobs Continue: Disabling a printer only prevents new jobs; existing jobs in the queue will still be processed.
Re-enable Requirement: A disabled printer will not accept new jobs until explicitly re-enabled using the enable command.
CUPS Daemon: The CUPS daemon (cupsd) must be running for the command to function correctly.
COMMON USE CASES
Administrators frequently use disable during maintenance routines such as refilling ink/toner, clearing paper jams, performing hardware checks, or updating printer drivers. It's crucial for preventing print jobs from being sent to a printer that is temporarily unavailable or malfunctioning.
USER NOTIFICATION
When a printer is disabled, users attempting to send jobs to it might experience delays, job queuing (pending), or error messages, depending on their client operating system and application. The `-r` option helps communicate the reason for the disablement to users or other administrators.
HISTORY
The Common Unix Printing System (CUPS) was initially developed by Easy Software Products, with its first public release in 1999. Apple Inc. acquired Easy Software Products in 2007 and has since maintained CUPS. The disable command has been a fundamental utility within the CUPS suite from its early stages, providing administrators with essential control over printer operations. It streamlined printer management in Unix environments, moving away from older, often more complex printing systems like LPR/LPRng, by offering a standardized and network-centric approach to print services. Its design reflects the need for robust administrative tools to manage network printers efficiently.


