Commands.page Logo

How to Save Aria2 Download Progress on Ubuntu

This article explains how to configure the aria2 download utility on Ubuntu to save progress and resume interrupted transfers. It identifies the specific command-line flag required to store download states and outlines the basic steps to implement this feature effectively.

The option that allows aria2 to remember the last download position for resuming is --save-session. This flag instructs aria2 to save the current download state to a specified file. To resume the download later, you must load this state using the --input-file option.

To enable this feature during a download, use the following command structure:

aria2c --save-session=session.txt --auto-save-interval=60 [URL]

The --auto-save-interval option ensures the session file is updated periodically, preventing data loss if the process crashes. To resume the download, run aria2 pointing to the saved session file:

aria2c --input-file=session.txt

For a permanent solution on Ubuntu, edit the aria2 configuration file located at ~/.config/aria2/aria2.conf. Add the following lines to automatically save and load sessions for every download:

save-session=/home/user/.aria2/session.txt input-file=/home/user/.aria2/session.txt save-session-interval=60

This configuration ensures download positions are remembered automatically without requiring manual flags each time.