This simple tutorial shows how to check file checksum in Ubuntu, Debian, Fedora or other Linux in both graphical and command line.
NOTE: this tutorial is tested and works in Ubuntu 22.04, Ubuntu 20.04, Fedora 35, Debian 11. Though, it should work on most Linux systems.
Why Verifying Downloads:
After downloading or receiving files from web server or your friends, it’s important to verify data integrity!
There could be errors caused by noise or other impairments during transmission. So, receivers may run into issues using the files without verifying the integrity.
Checksum is present to deal with this issue. And, you should see many servers provide either ‘SHASUMS’ file or checksum code in the download pages.
By checking local file checksum and comparing to the code from server, you can make sure the file you received are totally same to the one from server side.
Option 1: Check Checksum via Linux command:
Firstly, open a terminal window from system start menu (or search from ‘Activities’ overview screen).
When terminal opens, select run commands below accordingly.
- To check SHA256 (256-bit) checksum:
sha256sum /PATH/TO/FILE
- Check SHA512 (512-bit) checksum via:
sha512sum /PATH/TO/FILE
- for MD5 (128-bit) checksum, use:
md5sum /PATH/TO/FILE
- or use universal
shasum
command (replace 256 with 224, 384, 512, 512224, 512256 depends which algorithm you need):shasum -a 256 /PATH/TO/FILE
Tip: Drag & drop file into terminal will insert PATH to File automatically!
Option 2: Check checksum via Graphical tool ‘GtkHash’
There’s a simple graphical tool ‘GtkHash’ available in most Linux repositories. Just search for and install it from your system package manager (e.g., Ubuntu Software):
Then, open the app and load files you want to check. Finally click ‘Hash’ button to see the result.
Besides the common used MD5, SHA256 and SHA 1, you may enable more algorithms in the app preferences dialog. They include SHA3-512, MD6-256, MD6-512, CRC32, BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp, GOST and more.
Recent Comments