Linux command
apt-config 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show
apt-config dump
Example
apt-config dump | grep [Dir::Cache]
Example
apt-config shell VAR [Dir::Cache]
说明
apt-config displays APT's configuration values. It shows the effective configuration from all sources including /etc/apt/apt.conf, /etc/apt/apt.conf.d/, and command-line options. This is useful for debugging APT behavior, understanding which settings are active, and scripting with APT configuration values.
参数
- dump
- Show entire configuration
- shell _var_ _option_
- Output shell-compatible variable assignment
- -o _option_
- Set configuration option
- -c _file_
- Read additional configuration file
FAQ
What is the apt-config command used for?
apt-config displays APT's configuration values. It shows the effective configuration from all sources including /etc/apt/apt.conf, /etc/apt/apt.conf.d/, and command-line options. This is useful for debugging APT behavior, understanding which settings are active, and scripting with APT configuration values.
How do I run a basic apt-config example?
Run `apt-config dump` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does dump do in apt-config?
Show entire configuration