Change Your Mac Password from the Terminal

Rotate your own login password with the standard passwd command.

macOSpasswordsecuritypasswdLow risk
Run `passwd`, enter your current password once, then the new one twice.

01Command

Command
$ passwd

02What it does

passwd updates the password for your current account — the same credential you use at the login screen, for sudo, and for unlocking your keychain. Run `passwd username` with admin rights to change another local account's password. After changing it, remember that other devices and saved sessions still use the old password until re-signed in.

03Risk

RiskLow risk
RequirementsKnow your current account password
!Warning: The new password also unlocks your login keychain only if you enter the old keychain password when prompted; otherwise keychain items stay under the old password.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: Security & Privacy

06Related solutions