Commands.page Logo

How to Verify Aria2 Checksum on Ubuntu Linux

This article explains how to ensure file integrity when downloading with aria2 on Ubuntu. It identifies the specific command-line option required for checksum verification and provides practical examples of usage to prevent corrupted downloads.

The option that allows aria2 to verify the checksum of a downloaded file is --checksum. When using the aria2c command, you append this flag followed by the hash type and the expected digest value. This ensures that the file received matches the source exactly.

The syntax for this option is:

aria2c --checksum=TYPE=DIGEST [URL]

Supported hash types include md5, sha-1, sha-256, and sha-512. For example, to verify a SHA-256 hash on Ubuntu, you would run the following command:

aria2c --checksum=sha-256=abcd1234567890... https://example.com/file.zip

If the calculated checksum of the downloaded file does not match the provided digest, aria2 will report an error and mark the download as failed. This mechanism protects your system from corrupted data or tampered files during the transfer process.