How to Install Miniconda on Ubuntu 24.04 (Step by step guide)
Miniconda is a lightweight distribution of Conda that allows you to manage Python versions and virtual environments efficiently. Unlike Anaconda, Miniconda installs only the core Conda packages, giving you full control over what gets installed later.
In this guide, you will learn how to install Miniconda on Ubuntu 24.04, verify the installation, and start managing Python environments like a pro.
What Is Miniconda?
Miniconda is a minimal installer for Conda, a popular package and environment management system. It is widely used by developers, data scientists, and DevOps engineers who want a clean and flexible Python setup.
Key Benefits of Miniconda
- Lightweight and fast installation
- Easy management of multiple Python versions
- Isolated environments for different projects
- Ideal for servers and development machines
Prerequisites
Before installing Miniconda on Ubuntu 24.04, make sure you have:
- Ubuntu 24.04 (Desktop or Server)
- A non-root user with
sudoprivileges - Internet connection
- Basic knowledge of Linux commands
Step 1: Update the System
Always start by updating your system packages to ensure compatibility and security.
sudo apt update && sudo apt upgrade -y
Step 2: Download the Miniconda Installer
Visit the official Miniconda website and download the latest Linux installer.
Alternatively, you can use wget from the terminal.
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
💡 Tip: For ARM-based systems, download the appropriate installer matching your architecture.
Step 3: Verify the Installer (Optional but Recommended)
Verifying the installer ensures file integrity and security.
sha256sum Miniconda3-latest-Linux-x86_64.sh
Compare the output with the checksum provided on the official Miniconda website.
Step 4: Run the Miniconda Installer
Make the installer executable and start the installation process.
bash Miniconda3-latest-Linux-x86_64.sh
During the installation:
- Press Enter to review the license
- Type yes to accept the license terms
- Choose the installation path (default is recommended)
- Allow the installer to initialize Miniconda
Step 5: Initialize Conda
After installation, activate Conda by restarting your terminal or running:
source ~/.bashrc
Verify that Conda is installed correctly:
conda --version
You should see the installed Conda version displayed.
Step 6: Update Conda
It is best practice to update Conda immediately after installation.
conda update -n base -c defaults conda
Step 7: Create a Python Environment
Miniconda shines when managing isolated Python environments.
Create a New Environment
conda create --name myenv python=3.12
Activate the Environment
conda activate myenv
Deactivate the Environment
conda deactivate
Step 8: Install Packages Using Conda
You can install packages easily using Conda.
conda install numpy pandas matplotlib
For packages not available in Conda repositories, use pip:
pip install requests
Miniconda vs Anaconda
| Feature | Miniconda | Anaconda |
|---|---|---|
| Installer Size | Small | Very Large |
| Preinstalled Packages | Minimal | 250+ |
| Customization | High | Limited |
| Best For | Servers, DevOps, Clean Setup | Data Science Beginners |
Uninstalling Miniconda (Optional)
If you need to remove Miniconda completely:
rm -rf ~/miniconda3
Then remove Conda initialization from .bashrc:
nano ~/.bashrc
Delete the Conda-related lines and save the file.
Best Practices for Using Miniconda
- Use one environment per project
- Avoid installing packages in the base environment
- Regularly update Conda
- Export environments for reproducibility
conda env export > environment.yml
Conclusion
Installing Miniconda on Ubuntu 24.04 is a smart choice for anyone who needs a clean, flexible, and efficient Python environment. With Miniconda, you can easily manage dependencies, switch Python versions, and keep your system organized.
Whether you are a developer, data scientist, or system administrator, Miniconda provides a powerful foundation for your Python workflows.











