aria2 is a utility for downloading files\&. The supported protocols are HTTP(S), FTP, BitTorrent, and Metalink\&. aria2 can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth\&. It supports downloading a file from HTTP(S)/FTP and BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP is uploaded to the BitTorrent swarm\&. Using Metalink\'s chunk checksums, aria2 automatically validates chunks of data while downloading a file like BitTorrent\&.
Downloads URIs found in FILE\&. You can specify multiple URIs for a single entity: separate URIs on a single line using the TAB character\&. Reads input from stdin when
Check file integrity by validating piece hashes\&. This option has effect only in BitTorrent and Metalink downloads with chunk checksums\&. Use this option to re\-download a damaged portion of a file\&. Default:
Continue downloading a partially downloaded file\&. Use this option to resume a download started by a web browser or another program which downloads files sequentially from the beginning\&. Currently this option is only applicable to HTTP(S)/FTP downloads\&.
Print usage and exit\&. The help messages are classified in several categories\&. For example, type "\fB\-\-help\fR=http" for detailed explanation for the options related to HTTP\&. If no matching category is found, search option name using a given word in middle match and print the result\&. Available Values:
Set the connect timeout in seconds to establish connection to HTTP/FTP/proxy server\&. After the connection is established, this option makes no effect and
If aria2 receives `file not found\' status from the remote HTTP/FTP servers NUM times without getting a single byte, then force the download to fail\&. Specify
In Metalink or BitTorrent download you cannot specify file name\&. The file name specified here is only used when the URLs fed to aria2 are done by command line without \fB\-i\fR, \fB\-Z\fR option\&. For example: aria2c \-o myfile\&.zip "http://mirror1/file\&.zip" "http://mirror2/file\&.zip"
Download a file using N connections\&. If more than N URLs are given, first N URLs are used and remaining URLs are used for backup\&. If less than N URLs are given, those URLs are used more than once so that N connections total are made simultaneously\&. Please see
is given, URI is tried in the order appeared in the URI list\&. If
\fIfeedback\fR
is given, aria2 uses download speed observed in the previous downloads and choose fastest server in the URI list\&. This also effectively skips dead mirrors\&. The observed download speed is a part of performance profile of servers mentioned in
is given, selects one of the best mirrors for the first and reserved connections\&. For supplementary ones, it returns mirrors which has not been tested yet, and if each of them has already been tested, returns mirrors which has to be tested again\&. Otherwise, it doesn\'t select anymore mirrors\&. Like
\fIfeedback\fR, it uses a performance profile of servers\&. Default:
Use the certificate authorities in FILE to verify the peers\&. The certificate file must be in PEM format and can contain multiple CA certificates\&. Use
\fB\-\-check\-certificate\fR
option to enable verification\&.
.RE
.PP
\fB\-\-certificate\fR=FILE
.RS4
Use the client certificate in FILE\&. The certificate must be in PEM format\&. You may use
Use the private key in FILE\&. The private key must be decrypted and in PEM format\&. The behavior when encrypted one is given is undefined\&. See also
In multi file torrent, the adjacent files specified by this option may also be downloaded\&. This is by design, not a bug\&. A single piece may include several files or part of files, and aria2 writes the piece to the appropriate files\&.
Print file listing of \&.torrent or \&.metalink file and exit\&. In case of \&.torrent file, additional information (infohash, piece length, etc) is also printed\&.
Specify the external IP address to report to a BitTorrent tracker\&. Although this function is named "external", it can accept any kind of IP addresses\&. IPADDRESS must be a numeric IP address\&.
option and file is complete, continue to seed file\&. If you want to check file and download it only when it is damaged or incomplete, set this option to
\fIfalse\fR\&. This option has effect only on BitTorrent download\&. Default:
Set minimum level of encryption method\&. If several encryption methods are provided by a peer, aria2 chooses the lowest one which satisfies the given level\&. Default:
If the whole download speed of every torrent is lower than SPEED, aria2 temporarily increases the number of peers to try for more download speed\&. Configuring this option with your preferred download speed can increase your download speed in some cases\&. You can append
Directly read from and write to each file mentioned in \&.torrent file\&. Use this option if lots of files are listed in \&.torrent file and aria2 complains it cannot open files anymore\&. Default:
is specified, when a file whose suffix is "\&.torrent" or content type is "application/x\-bittorrent" is downloaded, aria2 parses it as a torrent file and downloads files mentioned in it\&. If
Specify the prefix of peer ID\&. The peer ID in BitTorrent is 20 byte length\&. If more than 20 bytes are specified, only first 20 bytes are used\&. If less than 20 bytes are specified, the random alphabet characters are added to make it\'s length 20 bytes\&. Default:
is specified, when a file whose suffix is "\&.metaink" or content type of "application/metalink+xml" is downloaded, aria2 parses it as a metalink file and downloads files mentioned in it\&. If
The number of servers to connect to simultaneously\&. Some Metalinks regulate the number of servers to connect\&. aria2 strictly respects them\&. This means that if Metalink defines the maxconnections attribute lower than NUM_SERVERS, then aria2 uses the value of maxconnections attribute instead of NUM_SERVERS\&. See also
If false is given, aria2 aborts download when a piece length is different from one in a control file\&. If true is given, you can proceed but some download progress will be lost\&. Default:
Rename file name if the same file already exists\&. This option works only in HTTP(S)/FTP download\&. The new file name has a dot and a number(1\&.\&.9999) appended\&. Default:
Save a control file(*\&.aria2) every SEC seconds\&. If
\fI0\fR
is given, a control file is not saved during download\&. aria2 saves a control file when it stops regardless of the value\&. The possible values are between
Enable the built\-in HTTP server\&. Currently, this is the experimental feature and it just provides the current download progress\&. Use your web browser(console\-based ones, such as elinks, w3m, are recommended) to connect the server and see what\'s what\&. See also
Enable parameterized URI support\&. You can specify set of parts:
\fIhttp://{sv1,sv2,sv3}/foo\&.iso\fR\&. Also you can specify numeric sequences with step counter:
\fIhttp://host/image[000\-100:2]\&.img\fR\&. A step counter can be omitted\&. If all URIs do not point to the same file, such as the second example above, \-Z option is required\&. Default:
The options that have its argument surrounded by square brackets([]) take an optional argument\&. Usually omiting the argument is evaluated to \fItrue\fR\&. If you use short form of these options(such as \fI\-V\fR) and give an argument, then the option name and its argument should be concatenated(e\&.g\&. \fI\-Vfalse\fR)\&. If any spaces are inserted between the option name and the argument, the argument will be treated as URI and usually this is not what you expect\&.
You can specify multiple URLs in command\-line\&. Unless you specify \fB\-Z\fR option, all URLs must point to the same file or downloading will fail\&.
You can also specify arbitrary number of torrent files and metalink files stored on a local drive\&. Please note that they are always treated as a separate download\&.
You can specify both torrent file with \-T option and URLs\&. By doing this, you can download a file from both torrent swarm and HTTP(S)/FTP server at the same time, while the data from HTTP(S)/FTP are uploaded to the torrent swarm\&. Note that only single file torrent can be integrated with HTTP(S)/FTP\&.
Usually, you can resume transfer by just issuing same command(aria2c URL) if the previous transfer is made by aria2\&.
.sp
If the previous transfer is made by a browser or wget like sequential download manager, then use \-c option to continue the transfer(aria2c \fB\-c\fR URL)\&.
.sp
.SH"EXIT STATUS"
Because aria2 can handle multiple downloads at once, it encounters lots of errors in a session\&. aria2 returns the following exit status based on the last error encountered\&.
.PP
\fB0\fR
.RS4
If all downloads are successful\&.
.RE
.PP
\fB1\fR
.RS4
If an unknown error occurs\&.
.RE
.PP
\fB2\fR
.RS4
If time out occurs\&.
.RE
.PP
\fB3\fR
.RS4
If a resource is not found\&.
.RE
.PP
\fB4\fR
.RS4
If aria2 sees the specfied number of "resource not found" error\&. See
\fB\-\-max\-file\-not\-found\fR
option)\&.
.RE
.PP
\fB5\fR
.RS4
If a download aborts because download speed is too slow\&. See
\fB\-\-lowest\-speed\-limit\fR
option)
.RE
.PP
\fB6\fR
.RS4
If network problem occurs\&.
.RE
.PP
\fB7\fR
.RS4
If there are unfinished downloads\&. This error is only reported if all finished downloads are successful and there are unfinished downloads in a queue when aria2 exits by pressing Ctrl\-C by an user or sending TERM or INT signal\&.
.RE
.sp
.it1an-trap
.nran-no-space-flag1
.nran-break-flag1
.br
Note
An error occurred in a finished download will not be reported as exit status\&.
.sp
.SH"ENVIRONMENT"
aria2 recognizes the following environment variables\&.
.PP
http_proxy [http://][USER:PASSWORD@]HOST[:PORT]
.RS4
Specify proxy server for use in HTTP\&. Overrides http\-proxy value in configuration file\&. The command\-line option
\fB\-\-http\-proxy\fR
overrides this value\&.
.RE
.PP
https_proxy [http://][USER:PASSWORD@]HOST[:PORT]
.RS4
Specify proxy server for use in HTTPS\&. Overrides https\-proxy value in configuration file\&. The command\-line option
\fB\-\-https\-proxy\fR
overrides this value\&.
.RE
.PP
ftp_proxy [http://][USER:PASSWORD@]HOST[:PORT]
.RS4
Specify proxy server for use in FTP\&. Overrides ftp\-proxy value in configuration file\&. The command\-line option
\fB\-\-ftp\-proxy\fR
overrides this value\&.
.RE
.PP
all_proxy [http://][USER:PASSWORD@]HOST[:PORT]
.RS4
Specify proxy server for use if no protocol\-specific proxy is specified\&. Overrides all\-proxy value in configuration file\&. The command\-line option
\fB\-\-all\-proxy\fR
overrides this value\&.
.RE
.PP
no_proxy [DOMAIN,\&...]
.RS4
Specify comma\-separated hostname or domains to which proxy should not be used\&. Overrides no\-proxy value in configuration file\&. The command\-line option
\fB\-\-no\-proxy\fR
overrides this value\&.
.RE
.SH"FILES"
.SS"aria2\&.conf"
By default, aria2 parses \fI$HOME/\&.aria2/aria2\&.conf\fR as a configuraiton file\&. You can specify the path to configuration file using \fB\-\-conf\-path\fR option\&. If you don\'t want to use the configuraitonf file, use \fB\-\-no\-conf\fR option\&.
.sp
The configuration file is a text file and has 1 option per each line\&. In each line, you can specify name\-value pair in the format: NAME=VALUE, where name is the long command\-line option name without "\-\-" prefix\&. You can use same syntax for the command\-line option\&. The lines beginning "#" are treated as comments\&.
.sp
.sp
.RS4
.nf
# sample configuration file for aria2c
listen\-port=60000
dht\-listen\-port=60000
seed\-ratio=1\&.0
max\-upload\-limit=50K
ftp\-pasv=true
.fi
.RE
.SS"dht\&.dat"
By default, the routing table of DHT is saved to the path $HOME/\&.aria2/dht\&.dat\&.
.sp
.SS"Control File"
aria2 uses a control file to track the progress of a download\&. A control file is placed in the same directory as the downloading file and its filename is the filename of downloading file with "\&.aria2" appended\&. For example, if you are downloading file\&.zip, then the control file should be file\&.zip\&.aria2\&. (There is a exception for this naming convention\&. If you are downloading a multi torrent, its control file is the "top directory" name of the torrent with "\&.aria2" appended\&. The "top directory" name is a value of "name" key in "info" directory in a torrent file\&.)
.sp
Usually a control file is deleted once download completed\&. If aria2 decides that download cannot be resumed(for example, when downloading a file from a HTTP server which doesn\'t support resume), a control file is not created\&.
.sp
Normally if you lose a control file, you cannot resume download\&. But if you have a torrent or metalink with chunk checksums for the file, you can resume the download without a control file by giving \-V option to aria2c in command\-line\&.
.sp
.SS"Input File"
The input file can contain a list of URIs for aria2 to download\&. You can specify multiple URIs for a single entity: separate URIs on a single line using the TAB character\&.
.sp
Each line is treated as if it is provided in command\-line argument\&. Therefore they are affected by \fB\-Z\fR and \fB\-P\fR options\&. The additional \fBout\fR and \fBdir\fR options can be specified after each line of URIs\&. This optional line must start with white space(s)\&.
.sp
For example, the content of uri\&.txt is
.sp
.sp
.RS4
.nf
http://server/file\&.iso http://mirror/file\&.iso
dir=/iso_images
out=file\&.img
http://foo/bar
.fi
.RE
If aria2 is executed with \fB\-i\fR uri\&.txt \fB\-d\fR /tmp options, then \fIfile\&.iso\fR is saved as \fI/iso_images/file\&.img\fR and it is downloaded from http://server/file\&.iso and http://mirror/file\&.iso\&. The file \fIbar\fR is downloaded from http://foo/bar and saved as \fI/tmp/bar\fR\&.
.sp
In some cases, \fBout\fR parameter has no effect\&. See note of \fB\-\-out\fR option for the restrictions\&.
.sp
.SS"Server Performance Profile"
This section describes the format of server performance profile\&. The file is plain text and each line has several NAME=VALUE pair, delimited by comma\&. Currently following NAMEs are recognized:
.PP
host
.RS4
Hostname of the server\&. Required\&.
.RE
.PP
protocol
.RS4
Protocol for this profile, such as ftp, http\&. Required\&.
.RE
.PP
dl_speed
.RS4
The average download speed observed in the previous download in bytes per sec\&. Required\&.
.RE
.PP
sc_avg_speed
.RS4
The average download speed observed in the previous download in bytes per sec\&. This value is only updated if the download is done in single connection environment and only used by AdaptiveURISelector\&. Optional\&.
.RE
.PP
mc_avg_speed
.RS4
The average download speed observed in the previous download in bytes per sec\&. This value is only updated if the download is done in multi connection environment and only used by AdaptiveURISelector\&. Optional\&.
.RE
.PP
counter
.RS4
How many times the server is used\&. Currently this value is only used by AdaptiveURISelector\&. Optional\&.
.RE
.PP
last_updated
.RS4
Last contact time in GMT with this server, specified in the seconds from the Epoch\&. Required\&.
.RE
.PP
status
.RS4
ERROR is set when server cannot be reached or out\-of\-service or timeout occurred\&. Otherwise, OK is set\&.
.RE
Those fields must exist in one line\&. The order of the fields is not significant\&. You can put pairs other than the above; they are simply ignored\&.
To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&. You can change URLs as long as they are pointing to the same file\&.
See \fB\-\-http\-proxy\fR, \fB\-\-https\-proxy\fR, \fB\-\-ftp\-proxy\fR and \fB\-\-all\-proxy\fR for details\&. You can specify proxy in the environment variables\&. See \fBENVIRONMENT\fR section\&.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\&.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU General Public License for more details\&.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc\&., 51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301 USA
In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under certain conditions as described in each individual source file, and distribute linked combinations including the two\&. You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL\&. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so\&. If you do not wish to do so, delete this exception statement from your version\&. If you delete this exception statement from all source files in the program, then also delete it here\&.