网站首页 > 资源文章 正文
linux 操作系统下cupsdisable命令介绍和使用案例
cupsdisable 命令是 Linux 操作系统中用于禁用 CUPS(通用打印服务)打印机的命令。它允许用户将指定的打印机设置为不可用状态,从而阻止任何新的打印作业被发送到该打印机
cupsdisable 命令概述
基本语法
bash
cupsdisable [options] printer_name
主要功能
- 禁用指定的打印机,使其不再接受打印任务。
- 常用于维护或故障排除期间,防止用户发送打印作业到故障或需要维护的打印机。
常用选项
- -h, --help: 显示帮助信息。
- -U, --user: 指定用于身份验证的用户名。
- -E, --encrypt: 使用 SSL 加密连接。
命令安装部署:
root@meng:~# which cuspdisable
root@meng:~# cuspdisable
Command 'cuspdisable' not found, did you mean:
command 'cupsdisable' from deb cups-client (2.4.1op1-1ubuntu4.10)
Try: apt install <deb name>
root@meng:~# apt install cups-client
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
cups-common libavahi-client3 libavahi-common-data libavahi-common3 libcups2
Suggested packages:
cups cups-bsd smbclient
The following NEW packages will be installed:
cups-client cups-common libavahi-client3 libavahi-common-data libavahi-common3 libcups2
0 upgraded, 6 newly installed, 0 to remove and 224 not upgraded.
Need to get 718 kB of archives.
After this operation, 6126 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 cups-common all 2.4.1op1-1ubuntu4.10 [253 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 libavahi-common-data amd64 0.8-5ubuntu5.2 [23.8 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 libavahi-common3 amd64 0.8-5ubuntu5.2 [23.9 kB]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 libavahi-client3 amd64 0.8-5ubuntu5.2 [28.0 kB]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 libcups2 amd64 2.4.1op1-1ubuntu4.10 [263 kB]
Get:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 cups-client amd64 2.4.1op1-1ubuntu4.10 [127 kB]
Fetched 718 kB in 4s (190 kB/s)
Selecting previously unselected package cups-common.
(Reading database ... 75207 files and directories currently installed.)
Preparing to unpack .../0-cups-common_2.4.1op1-1ubuntu4.10_all.deb ...
Unpacking cups-common (2.4.1op1-1ubuntu4.10) ...
Selecting previously unselected package libavahi-common-data:amd64.
Preparing to unpack .../1-libavahi-common-data_0.8-5ubuntu5.2_amd64.deb ...
Unpacking libavahi-common-data:amd64 (0.8-5ubuntu5.2) ...
Selecting previously unselected package libavahi-common3:amd64.
Preparing to unpack .../2-libavahi-common3_0.8-5ubuntu5.2_amd64.deb ...
Unpacking libavahi-common3:amd64 (0.8-5ubuntu5.2) ...
Selecting previously unselected package libavahi-client3:amd64.
Preparing to unpack .../3-libavahi-client3_0.8-5ubuntu5.2_amd64.deb ...
Unpacking libavahi-client3:amd64 (0.8-5ubuntu5.2) ...
Selecting previously unselected package libcups2:amd64.
Preparing to unpack .../4-libcups2_2.4.1op1-1ubuntu4.10_amd64.deb ...
Unpacking libcups2:amd64 (2.4.1op1-1ubuntu4.10) ...
Selecting previously unselected package cups-client.
Preparing to unpack .../5-cups-client_2.4.1op1-1ubuntu4.10_amd64.deb ...
Unpacking cups-client (2.4.1op1-1ubuntu4.10) ...
Setting up cups-common (2.4.1op1-1ubuntu4.10) ...
Setting up libavahi-common-data:amd64 (0.8-5ubuntu5.2) ...
Setting up libavahi-common3:amd64 (0.8-5ubuntu5.2) ...
Setting up libavahi-client3:amd64 (0.8-5ubuntu5.2) ...
Setting up libcups2:amd64 (2.4.1op1-1ubuntu4.10) ...
Setting up cups-client (2.4.1op1-1ubuntu4.10) ...
Adding group `lpadmin' (GID 120) ...
Done.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Scanning processes...
Scanning linux images...
命令案例;
root@meng:~# cups
cupsaccept cupsctl cupsdisable cupsenable cupsreject cupstestppd
root@meng:~# cupsdisable
root@meng:~# cupsdisable -h
cupsdisable: Error - expected hostname after "-h" option.
Usage: cupsdisable [options] destination(s)
Options:
-E Encrypt the connection to the server
-h server[:port] Connect to the named server and port
-r reason Specify a reason message that others can see
-U username Specify the username to use for authentication
--hold Hold new jobs
root@meng:~# lpstat -p
lpstat: Bad file descriptor
root@meng:~# cupsdisable meng
cupsdisable: Operation failed: server-error-service-unavailable
root@meng:~#
猜你喜欢
- 2024-11-10 英伦风的豪华品牌,捷豹XF-L(捷豹f-type 全新英伦跑车)
- 2024-11-10 售价29.99万起,对标林肯飞行家,大众揽境
- 2024-11-10 保时捷卡宴,哪些配置必须选(保时捷卡宴应该怎么选配置)
- 2024-11-10 Starbucks 与 Lady Gaga 合作推出「Cups of Kindness」饮品系列
- 2024-11-10 打印机如何添加水印?(打印机如何设置打印出水印)
- 2024-11-10 今日推荐——一个实时聊天的Web应用程序papercups
- 2024-11-10 高危!cups-browsed远程代码执行漏洞安全风险通告
- 2024-11-10 linux 操作系统下cupsenable命令介绍和使用案例
- 2024-11-10 Ubuntu计划将CUPS打印堆栈切换为Snap
- 2024-11-10 缓解压抑的方式,优客仕 YOUCUPS成人用品带来便携产品
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- 电脑显示器花屏 (79)
- 403 forbidden (65)
- linux怎么查看系统版本 (54)
- 补码运算 (63)
- 缓存服务器 (61)
- 定时重启 (59)
- plsql developer (73)
- 对话框打开时命令无法执行 (61)
- excel数据透视表 (72)
- oracle认证 (56)
- 网页不能复制 (84)
- photoshop外挂滤镜 (58)
- 网页无法复制粘贴 (55)
- vmware workstation 7 1 3 (78)
- jdk 64位下载 (65)
- phpstudy 2013 (66)
- 卡通形象生成 (55)
- psd模板免费下载 (67)
- shift (58)
- localhost打不开 (58)
- 检测代理服务器设置 (55)
- frequency (66)
- indesign教程 (55)
- 运行命令大全 (61)
- ping exe (64)
本文暂时没有评论,来添加一个吧(●'◡'●)