Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Does anyone know how to view passwords in Terminal? Maybe by accessing the Keychain data or something? I want to be able to view passwords in Terminal with just a series of commands.

share|improve this question

1 Answer 1

up vote 9 down vote accepted

Check out the security command. You can get detailed information about it's use by reading its man entry man security

An in-depth article on it's use is here.

share|improve this answer
Rob - Thanks for the link - this tool will be invaluable for cleaning up my keychains programatically. –  bmike May 3 '11 at 20:46
tell me about it! I've spend the last 10 minutes exploring :) –  RobZolkos May 3 '11 at 20:52
Nice one. Once again this site proves to be a fountain of quality info. :) –  boehj May 4 '11 at 5:41
not bad, not bad –  luca590 May 4 '11 at 15:40
Very cool! Terminal has "unlimited" power! –  daviesgeek Sep 6 '11 at 17:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.