← 返回命令列表

Linux command

cupsdisable 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Disable a printer

cupsdisable [printer_name]

Disable with reason

cupsdisable -r "[maintenance]" [printer_name]

Disable and cancel all jobs

cupsdisable -c [printer_name]

说明

cupsdisable stops a CUPS printer or class from processing further jobs. By default, the in-progress job continues to print but new jobs queue up until the destination is re-enabled with cupsenable. With -c, all jobs are cancelled; with --hold, the current job finishes and remaining jobs are placed on hold (release them later with cupsenable --release). Requires CUPS administrator privileges (member of the lpadmin group or root).

参数

-c
Cancel all jobs queued on the destination after disabling it.
-r _reason_
Reason message attached to the stopped state and reported by lpstat.
-E
Force encryption of the connection to the CUPS server.
-U _user_
Authenticate as _user_ instead of the current login.
-h _server_:_port_
Connect to a specific CUPS server (default: $CUPS_SERVER, then localhost:631).
--hold
Hold all remaining queued jobs once the current one finishes — useful for performing maintenance after the in-flight job completes.

FAQ

What is the cupsdisable command used for?

cupsdisable stops a CUPS printer or class from processing further jobs. By default, the in-progress job continues to print but new jobs queue up until the destination is re-enabled with cupsenable. With -c, all jobs are cancelled; with --hold, the current job finishes and remaining jobs are placed on hold (release them later with cupsenable --release). Requires CUPS administrator privileges (member of the lpadmin group or root).

How do I run a basic cupsdisable example?

Run `cupsdisable [printer_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c do in cupsdisable?

Cancel all jobs queued on the destination after disabling it.