> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Linux installer

> [accordion] Using Miniconda in a commercial setting?
>
> * You might need to purchase a license to stay compliant with our [Terms of Service](https://www.anaconda.com/legal).
>
> * If your company security policies do not allow admin privileges for end users, your IT admin can deploy Miniconda through a configuration management tool (such as Ansible, Puppet, or Chef).

This page provides instructions for installing Miniconda on Linux with the command line in a shell application.

## Installation steps

1. Download the latest version of Miniconda by opening a terminal and running one of the following commands (depending on your Linux architecture and preferred download tool):

   > [!WARNING]
   >
   > The `linux-aarch64` package builds might not be compatible with certain Raspberry Pi setups, as Miniconda uses compiler options that target the server-class Neoverse N1/N2 microarchitecture.

   > [tab] curl
   >
   > ```sh Linux x86 theme={null}
   > curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
   > ```
   >
   > ```sh AWS Graviton2/ARM64 theme={null}
   > curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
   > ```

   > [tab] wget
   >
   > ```sh Linux x86 theme={null}
   > wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
   > ```
   >
   > ```sh AWS Graviton2/ARM64 theme={null}
   > wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
   > ```

   > [!NOTE]
   >
   > For instructions on downloading an older installer version, see [Using older installer versions](https://anaconda.com/docs/getting-started/advanced-install/old-os.md).

2. (Optional) Anaconda recommends verifying the integrity of the installer after downloading it.

   > [accordion] How do I verify my installer's integrity?
   >
   > To ensure that your downloaded installer has not been tampered with or corrupted, generate its SHA-256 hash value and compare that hash to the official hash provided in the archive.
   >
   > 1. Open a terminal and run the following command:
   >
   >    ```sh Hash comparison command theme={null}
   >    sha256sum <PATH_TO_INSTALLER_FILE>
   >    ```
   >
   >    ```sh Example theme={null}
   >    sha256sum ~/Miniconda3-latest-Linux-x86_64.sh
   >    ```
   >
   >    Comments
   >
   >    Replace \<PATH\_TO\_INSTALLER\_FILE> with the file path to the downloaded installer file.
   >
   > 2. Note the generated SHA-256 hash value from the output.
   >
   > 3. Visit [repo.anaconda.com/miniconda](https://repo.anaconda.com/miniconda/) to find the official SHA-256 hash for your installer.
   >
   > 4. Compare the hash values. If they match, the installer is safe to use.
   >
   > > [!TIP]
   > >
   > > For more information, see [cryptographic hash verification](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html#cryptographic-hash-verification) in the official conda documentation.

3. Install Miniconda by running one of the following commands (depending on your Linux architecture):

   > [!WARNING]
   >
   > The `linux-aarch64` package builds might not be compatible with certain Raspberry Pi setups, as Miniconda uses compiler options that target the server-class Neoverse N1/N2 microarchitecture.

   ```sh Linux x86 theme={null}
   bash ~/Miniconda3-latest-Linux-x86_64.sh
   ```

   ```sh AWS Graviton2/ARM64 theme={null}
   bash ~/Miniconda3-latest-Linux-aarch64.sh
   ```

4. Press Return to review [Miniconda's End User License Agreement (EULA)](https://www.anaconda.com/legal/terms/miniconda). You can view Anaconda's Terms of Service (TOS) at [https://www.anaconda.com/legal](https://www.anaconda.com/legal).

5. Enter `yes` to agree to the EULA.

6. Press Return to accept the default install location (`PREFIX=/home/<USER>/miniconda3`), or enter another file path to specify an alternate installation directory. The installation might take a few minutes to complete.

7. Choose `yes` when asked if you want to initialize conda. This modifies your shell configuration to initialize conda whenever you open a new shell and to recognize conda commands automatically.

8. The installer finishes and displays, "Thank you for installing Miniconda3!"

9. Close and re-open your terminal window for the installation to fully take effect, or use the following command to refresh the terminal, depending on your shell:

   ```sh Bash theme={null}
   source ~/.bashrc
   ```

   ```sh Zsh theme={null}
   source ~/.zshrc
   ```

   ```sh Fish theme={null}
   exec fish
   ```

   > [!NOTE]
   >
   > You should see `(base)` in the command line prompt. This tells you that you're in your base conda environment. To learn more about environments, see [Environments](https://anaconda.com/docs/getting-started/working-with-conda/environments.md).

## Verify your install

Verify your installation by opening your terminal application and running `conda list`. If conda has been installed correctly, a list of installed packages appears:

```sh Command theme={null}
conda list
```

```sh Example output theme={null}
# packages in environment at /home/<USER>/miniconda3:
#
# Name                    Version                   Build  Channel
ca-certificates           2024.9.24            h06a4308_0  
certifi                   2024.8.30       py312h06a4308_0  
conda                     24.9.2          py312h06a4308_0  
openssl                   3.0.15               h5eee18b_0  
python                    3.12.7               h5148396_1  
...
```

## Choose how you want to work with conda

Anaconda Navigator provides a graphical user interface (GUI) to interface with conda (An open-source package and environment manager that installs, updates, and removes packages with their dependencies in isolated environments, allowing multiple versions of the same software without conflicts.), without using the command line.

If you prefer working at the command line, you can interface with conda directly through Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) (Windows) or your system's terminal (macOS and Linux) after you complete your installation.

> [!NOTE]
>
> Anaconda Navigator is not included with Miniconda. Follow the instructions on [Installing Navigator](https://anaconda.com/docs/legacy/anaconda-navigator/install.md) to manually install Navigator onto your computer.

> [card] [Get started with Navigator](https://anaconda.com/docs/legacy/anaconda-navigator/getting-started.md)
>
> Beginner
>
> Manage packages and environments with a desktop application

> [card] [Work with conda](https://anaconda.com/docs/getting-started/working-with-conda/main.md)
>
> Use command-line tools for package and environment management

## Advanced install options

For more advanced installation options, such as installing with silent mode, installing on older operating systems, or installing for multiple users, see [Advanced installation](https://anaconda.com/docs/getting-started/advanced-install/main.md).

## Troubleshooting

Troubleshoot

### command not found: conda

***

<details>
  <summary>Cause</summary>

  The `command not found: conda` error occurs when your command line interface (CLI) can't find the conda command in order to use it. This might be because:

  * You don't have conda properly initialized.
  * You have set `auto_activate_base` to `false`.
  * You're using a shell that conda doesn't support.
  * Conda is not installed or the install was incomplete or corrupted.

  > [!NOTE]
  >
  > These issues primarily occur on macOS/Linux computers. Anaconda Distribution and Miniconda installations on Windows include Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.), which opens with conda initialized by default.
</details>

***

<details>
  <summary>Solution</summary>

  > [accordion] Initialize conda in your shell
  >
  > If you recently installed Anaconda Distribution or Miniconda, make sure you closed and reopened your CLI to make conda's initialization take effect.
  >
  > > [!TIP]
  > >
  > > If you don't want to close your CLI, you can also use one of the following `source` commands to refresh your shell:
  > >
  > > ```sh bash theme={null}
  > > source ~/.bashrc
  > > ```
  > >
  > > ```sh zsh theme={null}
  > > source ~/.zshrc
  > > ```
  > >
  > > ```sh fish theme={null}
  > > source ~/.config/fish/config.fish
  > > ```
  > >
  > > ```sh cshrc theme={null}
  > > source ~/.cshrc
  > > ```
  > >
  > > ```sh xonshrc theme={null}
  > > source ~/.xonshrc
  > > ```
  > >
  > > Comments
  > >
  > > Use the command that matches your shell.
  >
  > You can also initialize conda directly from its `bin` directory:
  >
  > ```sh Initialization command theme={null}
  > <PATH_TO_CONDA>/bin/conda init
  > ```
  >
  > ```sh Examples theme={null}
  > miniconda3/bin/conda init
  > /opt/miniconda3/bin/conda init
  > anaconda3/bin/conda init
  > /opt/anaconda3/bin/conda init
  > ```
  >
  > Comments
  >
  > Replace \<PATH\_TO\_CONDA> with a path to your conda installation.

  > [accordion] Set auto\_activate\_base to true
  >
  > To see the value for `auto_activate_base`, run the following command:
  >
  > ```sh theme={null}
  > conda config --describe auto_activate_base
  > ```
  >
  > If your terminal returns `false`, this means that conda is not automatically activating your base environment when you start a new shell. This behavior emulates your system Python, and some users prefer to have their conda environment be inactive until they need it. However, this is not conda's default behavior after installation.
  >
  > To change the value of `auto_activate_base` to `true`, run the following command:
  >
  > ```sh theme={null}
  > conda config --set auto_activate_base true
  > ```
  >
  > If you have `auto_activate_base` set as `false`, the conda command will still be available as a shell function, but your base environment will not be active when a new shell is started. To activate your base environment, run `conda activate`.

  > [accordion] Use a shell that conda supports
  >
  > For information on which shells conda supports, see [Conda activate](https://docs.conda.io/projects/conda/en/stable/dev-guide/deep-dives/activation.html#conda-activate) in the official conda documentation.

  > [accordion] Verify your installation of conda
  >
  > If you have tried to initialize conda in your shell but it didn't work, try uninstalling and reinstalling [Anaconda Distribution](https://anaconda.com/docs/getting-started/installation.md) or [Miniconda](https://anaconda.com/docs/getting-started/installation.md).
  >
  > > [!TIP]
  > >
  > > Make sure that you say yes to the initialization option, and, if installing from the CLI, reinitialize your shell by restarting it or using its `source` command. For more information, see [Initialize conda in your shell](#initialize-conda-in-your-shell).
</details>

Troubleshoot

### Miniconda installer error: File or directory already exists

***

<details>
  <summary>Cause</summary>

  When you run the installer and the target directory already contains a Miniconda installation, the installer displays the following error:

  ```txt theme={null}
  ERROR: File or directory already exists: '/Users/username/miniconda3'
  If you want to update an existing installation, use the -u option.
  ```

  > [!WARNING]
  >
  > Do not use the `-u` or `-f` flags to install over an existing installation. These flags do not perform a true update. They extract the installer's packages on top of your existing files without resolving dependencies, which can leave your installation in a broken state.
</details>

***

<details>
  <summary>Solution</summary>

  To resolve this error, either perform a clean reinstall or recover your existing installation:

  * **Clean reinstall**: [Uninstall Miniconda](https://anaconda.com/docs/getting-started/miniconda/uninstall.md), then run the installer again.
  * **Recover your installation**: If your installation is corrupted and you want to preserve your packages and environments, follow the steps in [Recovering your Miniconda installation](#recovering-your-miniconda-installation).
</details>

Troubleshoot

### Recovering your Miniconda installation

***

<details>
  <summary>Cause</summary>

  If your Miniconda installation has become corrupted and is in a state where normal conda commands are not functioning, use the following steps to repair your installation and preserve your installed packages and environments.
</details>

***

<details>
  <summary>Solution</summary>

  1. Download a [new installer](https://repo.anaconda.com/miniconda/) for your operating system.

     > [tab] Windows
     >
     > 1. Open a terminal application, such as Command Prompt or PowerShell.
     > 2. If necessary, navigate to the parent directory of your Miniconda installation (by default, this is your user profile).
     > 3. Rename your existing installation directory so you do not overwrite it:
     >
     >    ```sh Command Prompt theme={null}
     >    move miniconda3 miniconda_old
     >    ```
     >
     >    ```powershell PowerShell theme={null}
     >    Move-Item miniconda3 miniconda_old
     >    ```
     > 4. Run the new Miniconda installer. When prompted for an install location, choose the same directory as your original installation.
     > 5. Copy your previous packages and environments to the new installation:
     >
     >    ```sh theme={null}
     >    robocopy miniconda_old miniconda3 /S
     >    ```
     > 6. Delete your old Miniconda installation directory:
     >
     >    ```sh Command Prompt theme={null}
     >    rd /s /q miniconda_old
     >    ```
     >
     >    ```powershell PowerShell theme={null}
     >    Remove-Item -Recurse -Force miniconda_old
     >    ```

     > [tab] macOS/Linux
     >
     > 1. Open a terminal application.
     > 2. If necessary, navigate to the parent directory of your Miniconda installation (by default, this is your home directory).
     > 3. Rename your existing installation directory so you do not overwrite it:
     >
     >    ```sh theme={null}
     >    mv miniconda3 miniconda_old
     >    ```
     > 4. Run the new Miniconda installer. When prompted for an install location, choose the same directory as your original installation:
     >
     >    ```sh macOS theme={null}
     >    bash ~/Downloads/Miniconda3-latest-MacOSX-arm64.sh
     >    ```
     >
     >    ```sh Linux x86 theme={null}
     >    bash ~/Downloads/Miniconda3-latest-Linux-x86_64.sh
     >    ```
     >
     >    ```sh Linux arm64 theme={null}
     >    bash ~/Downloads/Miniconda3-latest-Linux-aarch64.sh
     >    ```
     > 5. Copy your previous packages and environments to the new installation:
     >
     >    ```sh theme={null}
     >    rsync -a miniconda_old/ miniconda3/
     >    ```
     > 6. Delete your old Miniconda installation directory:
     >
     >    ```sh theme={null}
     >    rm -rf miniconda_old
     >    ```

  2. Run `conda list` to view the packages from the previous installation.

  3. Run `conda info --envs` to list the environments created in the previous installation, which are now available in the new installation.
</details>

Troubleshoot

### Proxy request sent, not found

***

<details>
  <summary>Cause</summary>

  Your company likely has security policies or a firewall in place that prevent communications with external servers or certain URLs.
</details>

***

<details>
  <summary>Solution</summary>

  1. First, work with your IT team to allowlist connections to the following URLs:

     ```txt theme={null}
     https://anaconda.org
     https://repo.anaconda.com
     https://repo.anaconda.cloud
     ```

     > [!NOTE]
     >
     > Allowlisting `https://repo.anaconda.cloud` is only necessary if your company has an Anaconda organization and you require access to channels in that organization.

  2. [Install](https://anaconda.com/docs/getting-started/main.md) Anaconda Distribution or Miniconda again.

  Once your installation is complete, you might also need to connect your company's firewall/proxy server to your conda configuration file (`.condarc`). For more information on this, see [Using Anaconda behind a firewall or proxy](https://anaconda.com/docs/anaconda-platform/getting-started-with-anaconda-platform.md#using-anaconda-behind-a-firewall-or-proxy-optional).
</details>
