> 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-4-zhang-an-zhuang-ying-yong-cheng-xu-ruan-jian-bao-he-ports/4.1.-gai-shu.md).

# 4.1.概述

FreeBSD 自带了丰富的系统工具作为基本系统的一部分。此外，FreeBSD 提供了两种互补技术用于安装第三方软件：FreeBSD Ports，用于从源代码安装；以及软件包，用于从预构建的二进制文件安装。可以使用任一方法从本地设备或网络安装软件。

阅读本章，你将了解：

* 二进制软件包和 ports 之间的区别。
* 如何查找已移植到 FreeBSD 的第三方软件。
* 如何使用 pkg 管理二进制软件包。
* 如何使用 Ports 从源代码构建第三方软件。
* 如何找到应用程序安装的文件，以便进行安装后配置。
* 软件安装失败时该怎么办。


---

# 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:

```
GET https://handbook.bsdcn.org/di-4-zhang-an-zhuang-ying-yong-cheng-xu-ruan-jian-bao-he-ports/4.1.-gai-shu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
