# 15.4.关机流程

在使用 [shutdown(8)](https://man.freebsd.org/cgi/man.cgi?query=shutdown\&sektion=8\&format=html) 进行受控关机时，[init(8)](https://man.freebsd.org/cgi/man.cgi?query=init\&sektion=8\&format=html) 会尝试运行脚本 **/etc/rc.shutdown**，然后向所有进程发送 `TERM` 信号，并随后向未能及时终止的进程发送 `KILL` 信号。

要在支持电源管理的架构和系统上关闭 FreeBSD 机器，请使用 `shutdown -p now` 立即断电。要重启 FreeBSD 系统，请使用 `shutdown -r now`。运行 [shutdown(8)](https://man.freebsd.org/cgi/man.cgi?query=shutdown\&sektion=8\&format=html) 需要具有 `root` 权限或属于 `operator` 组。也可以使用 [halt(8)](https://man.freebsd.org/cgi/man.cgi?query=halt\&sektion=8\&format=html) 和 [reboot(8)](https://man.freebsd.org/cgi/man.cgi?query=reboot\&sektion=8\&format=html)。更多信息请参阅它们的手册页以及 [shutdown(8)](https://man.freebsd.org/cgi/man.cgi?query=shutdown\&sektion=8\&format=html)。

关于如何修改组成员身份，请参阅 [《用户与基本账户管理》](https://docs.freebsd.org/en/books/handbook/basics/#users-synopsis)。

> **注意**
>
> 电源管理功能要求 [acpi(4)](https://man.freebsd.org/cgi/man.cgi?query=acpi\&sektion=4\&format=html) 作为模块加载，或静态编译进自定义内核中。 |


---

# Agent Instructions: 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-15-zhang-freebsd-de-yin-dao-guo-cheng/15.4.-guan-ji-liu-cheng.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.
