Print a certificate SHA-256 fingerprint
Build a paste-ready command, then review its compatibility and effects before running it.
openssl x509 -in <certificate> -noout -fingerprint -sha256Complete required fields to copy the generated command.
read-onlyno known side effects Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-20
Requirementsopensslopenssl must be installed and available on PATH.
Version supportopenssl Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalssha256 Fingerprint=9A:4B:12:73:5F:86:21:4D:79:1B:02:DD:92:B1:E5:64:17:A0:CE:42:94:AD:41:F9:74:1C:31:18:A2:38:BE:90Representative successful output; values vary with the selected target and system state.
Known errorsopenssl: command not foundopenssl is missing or is not available on PATH.
Verifyopenssl x509 -in {{certificate}} -noout -fingerprint -sha256The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01opensslCommandRuns the openssl stage of this one-liner.
02x509ArgumentPasses x509 to openssl.
03-inOptionConfigures openssl with the -in option.
04<certificate>ParameterA value supplied in the Fill parameters section.
05-nooutOptionConfigures openssl with the -noout option.
06-fingerprintOptionConfigures openssl with the -fingerprint option.
07-sha256OptionConfigures openssl with the -sha256 option.
Example input
openssl x509 -in server.crt -noout -fingerprint -sha256
Example output
sha256 Fingerprint=9A:4B:12:73:5F:86:21:4D:79:1B:02:DD:92:B1:E5:64:17:A0:CE:42:94:AD:41:F9:74:1C:31:18:A2:38:BE:90
Illustrative output — exact values vary by system and data.
Official sources