How to calculate MD5 in Linux

Well, there are many ways to calculate MD5 hash of a string, in this post, I show you 3 command line that you can find them handy to get MD5 hash quickly and easily

1. Using PHP

If you have PHP installed on your system then do the following command

php –r ‘print md5(“MD5 in Linux”);’

2. Using OpenSSL

This required OpenSSL installed on you system

echo –n ‘MD5 in Linux’ | openssl md5

3. Using md5sum

echo –n ‘MD5 in Linux’ | md5sum -

Leave a Comment

Your email address will not be published. Required fields are marked *