How to disable automatic activation of the Conda base environment

A terminal that opens directly in Conda's base environment can hide which Python and package manager a command is using. Disabling auto activation keeps new shells in the system environment until an environment is activated deliberately.

Conda controls this startup behavior through the auto_activate configuration setting. The older auto_activate_base name is an alias, and default_activation_env remains base unless it has been changed.

The setting affects new shell sessions. If (base) is already active in the current terminal, deactivate it or open a new terminal after saving the setting; Conda can still activate base manually when it is needed.

Steps to disable Conda base environment auto activation:

  1. Check the current Conda auto-activation setting.
    $ conda config --show auto_activate
    auto_activate: True

    True means Conda activates the configured default environment when the shell initializes. On most installations, that environment is base.

  2. Disable automatic Conda environment activation.
    $ conda config --set auto_activate false

    Older examples may use auto_activate_base for the same setting. Current Conda records the value under auto_activate.

  3. Confirm the saved setting.
    $ conda config --show auto_activate
    auto_activate: False
  4. Deactivate base in the current terminal if it is still active.
    (base) $ conda deactivate

    Skip this step if the prompt does not show (base). The config change controls future shell startup; it does not remove the current active environment from an already-open terminal.

  5. Open a new terminal session.
  6. Verify Conda did not auto-activate an environment in the new session.
    $ printf 'CONDA_DEFAULT_ENV=%s\n' "${CONDA_DEFAULT_ENV:-unset}"
    CONDA_DEFAULT_ENV=unset

    If the shell prompt hides environment names, the CONDA_DEFAULT_ENV check is more direct than looking for (base) in the prompt.

  7. Activate base manually when needed.
    $ conda activate base
  8. Confirm manual activation still works.
    (base) $ printf 'CONDA_DEFAULT_ENV=%s\n' "$CONDA_DEFAULT_ENV"
    CONDA_DEFAULT_ENV=base