Sub topic 3
Turning on FileVault
This chapter assumes you can move around System Settings, have an Apple Account signed in on the Mac, and know an administrator password. It also assumes you can run a command in Terminal, including one with sudo. The previous chapters covered why full-disk encryption protects data at rest. Here you turn it on, make the choices the setup asks for, and confirm the result.
What FileVault does when you enable it
FileVault is the macOS feature that ties the encryption of your startup volume to your login password. The details depend on the hardware.
- On a Mac with Apple silicon or an Apple T2 Security Chip, the internal storage is always encrypted with a key held in dedicated hardware. Turning on FileVault does not start a long re-encryption. It changes how the volume is unlocked. The hardware key is protected by a key derived from your user password. Without that password, or a recovery method, the data cannot be read.
- On an older Intel Mac without a T2 chip, turning on FileVault encrypts the disk contents in the background. This can take a while, and the Mac stays usable during that time.
In both cases, the practical result is that someone who removes the drive, or starts the Mac and cannot log in, cannot read your files.
FileVault has one side effect to know about. Automatic login is turned off, because logging in must prove you know the password.
Before you begin
Check these items first:
- You are signed in to an administrator account. A standard account cannot turn FileVault on.
- The Mac is on reliable power. On a laptop, plug in the charger. This matters most on Intel Macs where encryption runs in the background.
- You know which recovery method you want. You choose it during setup.
- For an iCloud-based recovery, the Apple Account is signed in under System Settings and iCloud is working.
- You have a safe place to store a recovery key, if you choose that option. A password manager entry or a printed copy in a locked drawer both work.
Turning on FileVault in System Settings
The steps below follow recent versions of macOS. Menu wording shifts a little between releases.
- Open System Settings and choose Privacy & Security in the sidebar.
- Scroll to the FileVault section. It shows a status such as "FileVault is turned off for the disk Macintosh HD."
- Click Turn On. macOS asks for an administrator password. Enter it and confirm.
- Choose how you will recover access if you forget your login password. The two options are:
- Allow my iCloud account to unlock my disk. Apple Account recovery is used.
- Create a recovery key and do not use my iCloud account. macOS generates a key and shows it to you once.
- If you chose the recovery key, write it down or store it before you click Continue. Do not skip this. The next chapter covers how to store it and weigh the two methods.
- Other user accounts on the Mac may appear in a list. Enable the ones that should be able to unlock the disk (see the next section).
- Click Restart if prompted, or continue working. The pane reports progress. When the status reads "FileVault is turned on for the disk Macintosh HD," you are done.
Multiple user accounts
Only enabled users can unlock a FileVault disk at startup. During setup, macOS lists the other accounts and shows an Enable User button next to each. Click it and have each person enter their own password. A user who is not enabled can still sign in later, but only after an enabled user has unlocked the Mac. Until then, they cannot start it.
You can add more users after setup. When a user's password is changed through a normal macOS password change, the FileVault credentials follow it.
You can list the enabled users in Terminal:
sudo fdesetup listEach line shows a username and a unique identifier. If a person you expect is missing, they cannot unlock the disk at startup.
The two recovery choices in brief
The choice you make affects what happens when you forget your password.
| Choice | How recovery works | Main risk |
|---|---|---|
| iCloud account | You reset or unlock using your Apple Account credentials | If you lose access to the Apple Account, you lose this route |
| Recovery key | You type a key that macOS generated, made of letters and numbers in groups of four | If you lose the key and forget your password, the data cannot be recovered |
With either choice, Apple cannot read your data. The recovery key is a 24-character string in hyphen-separated groups, and macOS shows it only during setup. If you need a new one later, you can generate a replacement, but you must be able to unlock the disk to do so.
The next chapter compares the two in more detail, including where to keep the key.
What to expect after turning it on
Behavior after setup is mostly the same as before, with these differences:
- When you start the Mac, a login screen asks for the password before macOS fully loads. On Apple silicon, this screen appears after startup and unlocks the volume.
- Automatic login is unavailable. If you had it enabled, the setting is turned off.
- Sleeping or locking the screen does not re-encrypt the disk. FileVault protects the disk when the Mac is off or at the login window. While you are logged in and the Mac is awake, files are readable by anything running as your user.
- Performance impact is small on modern hardware, because encryption is done by dedicated hardware.
On an Intel Mac without a T2 chip, the System Settings pane may show an encryption percentage. You can keep working, but the Mac may be slower until it finishes. Do not let the Mac be shut off during this phase if you can avoid it. macOS resumes the work afterward.
Checking the result in Terminal
You can confirm the state without opening System Settings. The command is read-only and does not need sudo:
fdesetup statusTypical output:
FileVault is On.When encryption is still going on an older Mac, you might see a line such as Encryption in progress: Percent completed = 12. If FileVault is not on, the output is FileVault is Off.
For use in a script, fdesetup isactive prints true or false:
fdesetup isactiveA small check that exits with a failure code when FileVault is off:
#!/bin/bash
# Exit with an error if FileVault is not turned on.
if [ "$(fdesetup isactive)" = "true" ]; then
echo "FileVault is on."
else
echo "FileVault is NOT on." >&2
exit 1
fiTerminal can also turn FileVault on with sudo fdesetup enable. That command prints a personal recovery key to the terminal window. Anyone who can see your screen or your terminal history may see it, so the System Settings route is easier to do safely at first.
Common errors and how to fix them
- The Turn On button is dimmed. You are not signed in as an administrator, or a configuration profile from an employer or school manages the setting. Sign in with an admin account, or ask the administrator who manages the Mac.
- The iCloud option is missing. The Mac is not signed in to an Apple Account, or iCloud is unavailable. Sign in under System Settings, then try again. You can also choose the recovery key option.
- FileVault shows on, but another person cannot unlock the disk. Their account was not enabled. Log in as an enabled user, then use the FileVault settings to enable the other person.
sudo fdesetup listconfirms the result. - Encryption seems stuck at a percentage. On an Intel Mac, make sure the Mac is awake and plugged in. Progress may pause while the Mac sleeps. Check again with
fdesetup status. - Login fails after a password change made elsewhere. If the account password was changed outside macOS, for example in a directory service, the disk password may differ from the account password until you sign in with the old one and let macOS sync. Enter the most recent password you used at the startup screen, then change it normally.
- The recovery key does not work. Enter it exactly, with hyphens, using the characters shown. Letters are uppercase. Check that you copied it from the right Mac, because every Mac produces its own key.
Where FileVault stops
FileVault protects the disk while it is locked. Three limits matter at this point in the tutorial:
- It does not protect an unlocked, running Mac. Malware or a person at the keyboard can read what your account can read.
- It does not stop network attacks. That is the firewall's area, covered later.
- It does not help you find a missing Mac. Find My covers that.
Exercise
You enabled FileVault with the recovery key option on a Mac used by you and a family member. The family member says they cannot get past the startup screen with their password, although they can log in once you have started the Mac. What is most likely wrong, and which Terminal command lets you check it?
Show answer
The family member's account was not enabled as a FileVault user, so it cannot unlock the disk at startup. After you unlock the Mac, you can enable the account from the FileVault settings. Run sudo fdesetup list to see which users are enabled. The family member should appear in that list once fixed.
Exercise
Write a Terminal command that prints only true or false depending on whether FileVault is on, and explain why this form is better than fdesetup status for a script.
Show answer
fdesetup isactive prints true or false. A script can compare that one word directly, while the text from fdesetup status is a sentence that can also include progress lines, which makes matching less reliable.