# How to install conda in Ubuntu

## Install Miniconda (lightweight Conda)

### 1\. Download the Miniconda installer:

```bash
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
```

### 2\. Run the installer:

```bash
bash Miniconda3-latest-Linux-x86_64.sh
```

> ⚠️ Follow the prompts — accept the license, choose install location, and allow it to initialize Conda (recommended).

### 3\. Restart your shell (or run this now to enable conda):

```bash
source ~/.bashrc
```

### 4\. Check where Miniconda is installed

By default, it installs to your home directory, under:

```bash
~/miniconda3
```

Verify it exists:

```bash
ls ~/miniconda3
```

If you see folders like `bin`, `etc`, `envs`, then it’s installed correctly.

### 5\. Manually add Conda to your PATH

Run this command:

```bash
export PATH="$HOME/miniconda3/bin:$PATH"
```

Then test:

```bash
conda --version
```

If it works, proceed to initialize Conda:

```bash
conda init
```

### 6\. Make the PATH change permanent

To make the `PATH` available every time you open a terminal, add it to your `.bashrc` or `.zshrc`:

```bash
echo 'export PATH="$HOME/miniconda3/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
```

---

**😊 Thank You 😊**
