用 fdesetup authrestart 重启加密 Mac 免手动解锁

重启时把一次性解锁密钥交给固件,让 FileVault 加密的 Mac 开机自动解锁、直达登录界面。

macOSmacOS安全FileVault 磁盘加密加密中风险
运行 sudo fdesetup authrestart,按提示输入账户密码,Mac 重启后将跳过 FileVault 解锁界面。

01命令

命令
$ sudo fdesetup authrestart

02作用说明

开启 FileVault 后,Mac 每次开机都会停在解锁界面,必须输入密码才能解密磁盘——这让系统更新或远程维护后的无人值守重启无法完成。fdesetup authrestart 只要求输入一次账户密码,把一次性解锁密钥交给 EFI 固件后立即重启,开机过程自动解密磁盘,然后进入正常登录界面。未开启 FileVault 时 fdesetup 会提示该命令不可用;可先用 fdesetup status 确认状态。

03风险

风险中风险
使用条件FileVault enabled; admin privileges; interactive password prompt (or -key file for scripting).
!注意: 请只在你可以实际控制的电脑上使用——该绕过只对这一次重启有效,若中途断电关机,下次开机仍会回到正常解锁界面。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • fdesetup(8) - FileVault configuration
    ManPagez · technical · 2026-09-17
    依据: Mirrors the fdesetup man page: authrestart restarts the system and bypasses the FileVault pre-boot unlock, so no one has to enter the disk password at the login screen.
  • fdesetup(8) man page
    Xcode Man Pages (keith.github.io) · technical · 2026-09-17
    依据: Documents the `authrestart` verb: 'Restart the system, bypassing the initial unlock mechanism' — the Mac reboots and automatically unlocks the disk using the provided credentials.

最后验证: 2026-09-19 · 分类: 安全与隐私

06相关方案