> For the complete documentation index, see [llms.txt](https://handbook.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://handbook.bsdcn.org/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
```
