> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/handbook/di-11-zhang-da-yin/11.4.-zhi-jie-da-yin.md).

# 11.4.直接打印

对于偶尔的打印，可以直接将文件发送到打印机设备，而无需任何设置。例如，可以将名为 **sample.txt** 的文件发送到 `USB` 打印机：

```sh
# cp sample.txt /dev/unlpt0
```

直接打印到网络打印机取决于打印机的功能，但大多数打印机都接受通过 9100 端口的打印任务，且可以使用 [nc(1)](https://man.freebsd.org/cgi/man.cgi?query=nc\&sektion=1\&format=html) 与它们配合使用。要将相同的文件打印到 `DNS` 主机名为 *netlaser* 的打印机：

```sh
# nc netlaser 9100 < sample.txt
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://book.bsdcn.org/handbook/di-11-zhang-da-yin/11.4.-zhi-jie-da-yin.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
