Linux enable and disable commands

Updated: 05/04/2019 by Computer Hope
enable command

On some Unix-like operating systems, the enable command enables a printer, and the disable command disables a printer.

Description

enable starts the named printers or classes.

disable stops the named printers or classes.

Syntax

enable printer
disable [-c] [-W] [ -r [ reason ] ] printer

Options

-c Cancel any requests that are currently printing. This option cannot be used with the -W option. If the printer is remote, the -c option will be silently ignored.
-W Wait until the request currently being printed is finished before disabling printer. This option cannot be used with the -c option. If the printer is remote, the -W option will be silently ignored.
-r reason Assign a reason for the disabling of the printer(s). This reason applies to all printers specified. This reason is reported by lpstat -p. reason should be enclosed in quotes if it contains blanks. The default reason is "unknown reason" for the existing printer, and "new printer" for a printer added to the system but not yet enabled.
printer The name of the printer to be enabled or disabled.

Examples

enable printit

Enable printer printit.

lp — Print a file on the System V operating system.
lpstat — List the status of the LP print services.