conda config command allows you to modify configuration values in conda’s configuration files (e.g., ~/.condarc). This command is modeled after the git config command and writes to the user .condarc file by default.
Syntax
Config File Location Selection
By default,conda config writes to the user config file. You can specify a different location:
--system
Write to the system .condarc file.
--env
Write to the active conda environment .condarc file. If no environment is active, writes to the user config file.
--file FILE
Write to the specified file.
-p, --prefix PREFIX
Write to the .condarc file in the specified environment prefix.
-n, --name NAME
Write to the .condarc file in the named environment.
Config Subcommands
--show [KEY ...]
Display configuration values as calculated and compiled. If no arguments are given, shows information for all configuration values.
--show-sources
Display all identified configuration sources and their values.
--validate
Validate all configuration sources. Iterates over all .condarc files and checks for parsing errors.
--describe [KEY ...]
Describe given configuration parameters. If no arguments are given, shows information for all configuration parameters.
--write-default
Write the default configuration to a file. Equivalent to conda config --describe > ~/.condarc.
Config Modifiers
--get [KEY ...]
Get a configuration value.
--append KEY VALUE
Add one configuration value to the end of a list key.
--prepend KEY VALUE / --add KEY VALUE
Add one configuration value to the beginning of a list key.
--set KEY VALUE
Set a boolean or string key.
--remove KEY VALUE
Remove a configuration value from a list key. This removes all instances of the value.
--remove-key KEY
Remove a configuration key (and all its values).
--stdin
Apply configuration information given in YAML format piped through stdin.
Options
--json
Report all output as JSON. Suitable for programmatic use.
Common Use Cases
Display all configuration
View your current conda configuration:Add a channel
Add the conda-forge channel as a backup to defaults:The
--add and --prepend flags add channels to the beginning of the list (highest priority), while --append adds them to the end (lowest priority).