$aria2c "http://host/file.zip"
NOTE: To stop a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory. You can change URIs as long as they are pointing to the same file.
$ aria2c -ifiles.txt -j2
NOTE: -j option specifies the number of parallel downloads.
使用代理
$ aria2c --http-proxy="http://proxy:8080" "http://host/file"
$ aria2c --http-proxy="http://proxy:8080" --no-proxy="localhost,127.0.0.1,192.168.0.0/16" "http://host/file"
FTP 下载:
$ aria2c --ftp-proxy="http://proxy:8080" "ftp://host/file"
NOTE: See --http-proxy, --https-proxy, --ftp-proxy, --all-proxy and --no-proxy for details. You can specify proxy in the environment variables. See ENVIRONMENT section.
$ aria2c --http-proxy="http://username:password@proxy:8080" "http://host/file"
$ aria2c --http-proxy="http://proxy:8080" --http-proxy-user="username" --http-proxy-passwd="password" "http://host/file"
磁力链接下载
Download files with remote Metalink
$ aria2c --follow-metalink=mem "http://host/file.metalink"
Download using a local metalink file
$ aria2c -p --lowest-speed-limit=4000 file.metalink
NOTE: To stop a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory.
Download several local metalink files
$ aria2c -j2 file1.metalink file2.metalink
Download only selected files
$ aria2c --select-file=1-4,8 file.metalink
NOTE: The index is printed to the console using -S option.
Download a file using a local metalink file with user preference
$ aria2c --metalink-location=jp,us --metalink-version=1.1 --metalink-language=en-US file.metalink
BitTorrent 下载
$ aria2c --follow-torrent=mem "http://host/file.torrent"
$ aria2c --max-upload-limit=40K file.torrent
NOTE: –max-upload-limit specifies the max of upload rate
NOTE: To stop a download, press Ctrl-C. You can resume the transfer later by running aria2c with the same argument in the same directory.
$ aria2c "magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C&dn=aria2"
NOTE: Don’t forget to quote BitTorrent Magnet URIs which include & characters with single(') or double(") quotes when specifying URIs on the command-line.
$ aria2c -j2 file1.torrent file2.torrent
Only download specific files (usually called “selected download”)
$ aria2c --select-file=1-4,8 file.torrent
NOTE: The index is printed to the console using -S option.
$ aria2c --load-cookies=cookies.txt "http://host/file.zip"
NOTE: You can use Firefox/Mozilla/Chromium’s cookie files without modification.
原文:https://www.cnblogs.com/super-lulu/p/11739092.html