> 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-15-zhang-freebsd-de-yin-dao-guo-cheng/15.4.-guan-ji-liu-cheng.md).

# 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)。

关于如何修改组成员身份，请参阅 [《用户与基本账户管理》](/di-3-zhang-freebsd-ji-chu/3.3.-yong-hu-he-ji-ben-zhang-hu-guan-li.md)。

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