What is the apt (apt-get) --option used for?
Sophia Terry
Could a kind soul tell me about the apt --option?
- What does it do?
- How is it used?
- What options are set up via this flag?
1 Answer
From man apt:
-o, --option Set a Configuration Option; This will set an arbitrary configuration option. The syntax is -o Foo::Bar=bar. -o and --option can be used multiple times to set different options.For example, if you are behind a proxy, and want to test with different proxy setting values, you could do this:
apt-get update -o Acquire::http::Proxy ""When you are not sure of the correct setting value, testing different values using the -o option can be more practical than editing a config file in /etc/apt/apt.conf.d, saving and re-running the command. The -o option let's you skip the file editing part, and play with different values more directly.
More generally, the purpose of this option is to temporarily override any configuration value.
As @steeldriver pointed out in a comment,
the available options and option syntax are documented in the apt.conf manual page (man apt.conf).