# md5sum Command in Linux with Examples

Operating SystemLinuxMCA

Here we will see the md5sum command in Linux system. The MD5 is one of the Message Digest algorithm, that generates hash values to create checksum for the messages. It helps to identify if the integrity is maintained or not. Here we will see some example of md5sum command in Linux system.

If we use this command on a string, it will generate a hash value, if we create some minor change in the text, it will generate massive change in the checksum.

## Example

sh-4.4$echo 'Hello World' Hello World sh-4.4$ echo 'Hello World' | md5sum
e59ff97941044f85df5297e1c302d260 -
sh-4.4$ If we change the content of the string ‘Hello World’ to ‘Hello world’, then the MD5 hash value will be completely different. ## Example sh-4.4$ echo 'Hello World' | md5sum
e59ff97941044f85df5297e1c302d260 -
sh-4.4$echo 'Hello world' | md5sum f0ef7081e1539ac00ef5b761b4fb01b3 - sh-4.4$

We can create a file and also get checksum for that file. The command is simple, please see the example.

## Example: (File is sample.txt)

sh-4.4$cat sample.txt This is sample text sh-4.4$ md5sum sample.txt
sh-4.4\$