openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null | grep -E '^ *(s:|i:)'

Category: Web Servers & Proxies

openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null | grep -E '^ *(s:|i:)'

Inspect the full certificate chain subjects and issuers

-showcerts prints every certificate in the chain, and the grep keeps only the subject (s:) and issuer (i:) lines so you can see the order: leaf, intermediates, root. A complete chain here is what clients need to validate the site. The </dev/null redirect closes stdin so s_client exits immediately.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.