Saturday, April 20, 2024
361
rated 0 times [  361] [ 0]  / answers: 1 / hits: 610383  / 3 Years ago, sat, august 28, 2021, 5:00:06

How do I get the MD5 hash of a string directly from the terminal?



For example, I want the string abcdefg hashed. Currently the md5sum command only accepts a filename as input. I want to simply enter the following line and everything be done with.



md5sum abcdefg
output: ac54bcf346e578feb46888b3ecd2344f


How can I achieve that?


More From » command-line

 Answers
4

You can also say something like this :



~$ echo -n Welcome | md5sum
83218ac34c1834c26781fe4bde918ee4 -


It basically does the same thing as described by @enzotib, but is perhaps a bit simpler.


[#44171] Monday, August 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
whipstder

Total Points: 189
Total Questions: 110
Total Answers: 99

Location: Uzbekistan
Member since Sat, Feb 27, 2021
3 Years ago
;