Verify BLAKE2b Hash During Aria2 Download on Ubuntu
This article provides a concise guide on using the aria2 command-line utility within the Ubuntu operating system to download files while simultaneously verifying their integrity. It focuses specifically on the syntax required to validate a BLAKE2b checksum during the transfer process, ensuring data security and correctness without needing separate verification steps after the download completes.
To perform a download with BLAKE2b verification, you must use the
--checksum option followed by the algorithm type and the
hash value. The specific format requires you to declare
blake2b as the hash type before providing the digest
string. This tells aria2 to calculate the hash of the incoming data and
compare it against the provided value in real-time.
The basic command structure is as follows:
aria2c --checksum=blake2b=YOUR_HASH_HERE https://example.com/file.zipReplace YOUR_HASH_HERE with the full BLAKE2b hash string
provided by the file host. Replace the URL with the direct link to the
file you wish to download. If the calculated hash of the downloaded file
does not match the provided string, aria2 will halt the process and
report a checksum error, preventing corrupted or tampered files from
being saved.
Ensure that your installed version of aria2 supports the BLAKE2b
algorithm, as older versions found in some Ubuntu repositories may only
support MD5 or SHA variants. You can check your version by running
aria2c -v in the terminal. If supported, this method
provides a secure and efficient way to manage file integrity directly
from the command line.