> For the complete documentation index, see [llms.txt](https://hezhiqiang.gitbook.io/linux/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hezhiqiang.gitbook.io/linux/ming-ling/lpadmin.md).

# lpadmin

配置CUPS套件中的打印机和类

## 补充说明

**lpadmin命令** 用于配置CUPS套件中的打印机和类，也被用来设置打印服务器默认打印机。

### 语法

```
lpadmin(选项)(参数)
```

### 选项

```
-c：将打印机加入类；
-i：为打印机设置“system V”风格的接口脚本；
-m：从mode目录设置一个标准的“system V”接口脚本或“PPD”文件；
-o：为“PPD”或服务器设置选项；
-r：从类中删除打印机；
-u：设置打印机用户级的访问控制；
-D：为打印机提供一个文字描述；
-E：允许打印机接受打印任务；
-L：为打印机位置提供一个文字描述；
-P：为打印机指定一个ppd描述文件；
-p：指定要配置的打印机名称；
-d：设置默认打印机。
```

### 参数

打印机：指定要配置的打印机的名称。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hezhiqiang.gitbook.io/linux/ming-ling/lpadmin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
