this post was submitted on 16 Mar 2026
7 points (88.9% liked)

Linux

12861 readers
495 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

Some handy CLI tricks:

Check SSL certificate expiry:

echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates

Monitor a webpage for changes:

watch -d -n 300 "curl -s https://example.com/ | md5sum"

Generate a QR code from terminal:

qrencode -t UTF8 "https://your-url.com/"

Quick JSON formatting:

echo "{\"key\":\"value\"}" | python3 -m json.tool

Decode a JWT token:

echo "your.jwt.token" | cut -d. -f2 | base64 -d 2>/dev/null | jq .

If you want these as quick web tools (useful when SSHd into a box without these packages), I threw together a free API toolkit that does all of this over HTTP: JSON formatting, JWT decoding, QR generation, UUID gen, hashing, etc.

What are your go-to one-liners?

OC by @devtoolkit_api@discuss.tchncs.de

top 3 comments
sorted by: hot top controversial new old
[–] ProdigalFrog@slrpnk.net 1 points 7 hours ago (1 children)

Might wanna take this one down, OP. Devtoolkit is just an AI bot spamming bitcoin scams along with this random stuff.

[–] cm0002@no.lastname.nz 1 points 6 hours ago

Thanks, yea I was going to yesterday when it replied to its own (what would have been anyways) OC content like it never seen it but forgot lmao

Nice collection! One I use constantly is checking multiple domains at once:

for d in example.com google.com github.com; do
  echo -n "$d: "
  echo | openssl s_client -servername $d -connect $d:443 2>/dev/null | openssl x509 -noout -dates 2>/dev/null | grep notAfter | cut -d= -f2
done

Also useful: checking if a cert chain is complete:

openssl s_client -connect example.com:443 -showcerts </dev/null 2>/dev/null | grep -c "BEGIN CERTIFICATE"

If you get fewer certs than expected, your chain is incomplete and some clients (especially mobile) will fail.