How to Add Comments in an aria2 Configuration File?
This article provides a quick overview and direct answer on how to
include comments within an aria2 configuration file
(aria2.conf). It covers the specific syntax required to
comment out lines, rules regarding line placement, and best practices
for organizing your download settings. By the end of this guide, you
will know exactly how to document your configuration without causing
parsing errors.
The Comment Syntax for aria2
In an aria2 configuration file, comments are defined
using the hash symbol (#). Any line that
begins with a # is ignored by the aria2c
command-line utility when it parses the file.
Here is a basic example of how it looks:
# This is a comment line explaining the setting below
max-concurrent-downloads=3
# Disable IPv6 if your network doesn't support it
disable-ipv6=true
Key Rules to Remember
When adding comments to your aria2.conf file, keep the
following formatting rules in mind to prevent configuration errors:
- Whole-Line Comments Only: The
#symbol must be placed at the very beginning of the line. Inline comments (placing a comment on the same line as a setting) are generally not supported and can cause the option parser to fail or misinterpret the value. - No Inline Text: Avoid formatting like
max-concurrent-downloads=3 # My limit. Instead, place the comment on the line directly above the setting. - Blank Lines: You can freely use blank lines alongside comment lines to visually separate different sections of your configuration file (e.g., separating BitTorrent settings from general HTTP/FTP settings).