Back to blog

2026-04-21

Enable Touch ID for sudo on macOS

A guide on how to enable Touch ID for sudo commands on macOS.

Note: This will only work if your Mac has Touch ID hardware and it is set up properly.

On macOS, when using the sudo command, you normally have to enter the administrator or root password.

If you have Touch ID enabled, you can use it instead of typing your password when running any sudo command. This makes the terminal more convenient and better aligned with the system’s security features.

Enable Touch ID for sudo

Run the following command:

This will create the /etc/pam.d/sudo file with the option to use Touch ID for sudo.

Disable Touch ID for sudo

If you want to disable it, simply remove the file:

Continue reading

Previous

No previous post

Next

No next post