Install Anaconda on Ubuntu – Complete Step-by-Step Guide

Install Anaconda on Ubuntu Featured Image

To install Anaconda on Ubuntu, download the installer from repo.anaconda.com/archive, run bash Anaconda3-2026.07-1-Linux-x86_64.sh, accept the license, answer yes to conda init and reload your shell with source ~/.bashrc. Check it with conda list. This guide uses Anaconda 2026.07-1.

This tutorial shows you how to Install Anaconda on Ubuntu, the Python and R distribution for Data Science and Machine Learning related Applications. The Packages are managed by the Package Management System Conda.

Short version

Terminalbash
wget https://repo.anaconda.com/archive/Anaconda3-2026.07-1-Linux-x86_64.sh
sha256sum Anaconda3-2026.07-1-Linux-x86_64.sh
bash Anaconda3-2026.07-1-Linux-x86_64.sh
source ~/.bashrc
conda list
Table of Contents

What is Anaconda for Python?

Anaconda Distribution is a Python and R distribution for data science and machine learning. It comes with the conda package and environment manager and with Anaconda Navigator, a graphical launcher for the tools you install.

Conda lets you keep a separate set of packages for every project, so one project’s libraries never break another. That is the main reason people use it instead of installing everything into the system Python.

Is Anaconda Compatible with Ubuntu?

Yes. Anaconda publishes Linux installers for x86_64 and aarch64 and documents the install for Ubuntu and Debian. The installer is a plain shell script, so the same steps work on Ubuntu Desktop and Ubuntu Server.

How to install Anaconda on Ubuntu

Installing Anaconda on Ubuntu is straightforward. In this example, we are using Ubuntu Desktop 22.04 LTS, but the same procedure works on any current Ubuntu version, including Ubuntu Server. The screenshots are from the 2022.05 installer. The steps are the same for 2026.07-1.

Step 1 - Downloading the Anaconda Installer

First, we need to download the Anaconda installer. All installers live in the official archive at repo.anaconda.com/archive. The file name follows the pattern Anaconda3-<VERSION>-Linux-<ARCH>.sh. The current one is 2026.07-1, and it is over 1 GB, so give the download a moment.

Pick x86_64 for a normal PC or VM and aarch64 for ARM64 machines. You can download it from the terminal:

Terminalbash
wget https://repo.anaconda.com/archive/Anaconda3-2026.07-1-Linux-x86_64.sh

Anaconda recommends verifying the file. Generate the SHA-256 hash and compare it with the one listed next to the installer in the archive:

Terminalbash
sha256sum Anaconda3-2026.07-1-Linux-x86_64.sh

The screenshot below shows the old download page from 2022. Anaconda has since reorganized its website, so the current page looks different. The archive link above is the stable way to get the file.

Download Anaconda for Ubuntu

Step 2 - Opening the Terminal

Now we need to open the Ubuntu terminal. The easiest way to do this is by pressing the Windows key on your computer to open the search and then typing: terminal. Click on the terminal icon to open it.

Opening the Ubuntu Terminal

Step 3 - Updating the System

As always, first, make sure your System is up to date.

We can do this by running the following:

Terminalbash
sudo apt update -y && sudo apt upgrade -y
Updating the System

Step 4 - Install Anaconda on Ubuntu

Now we can go ahead and install Anaconda on Ubuntu. If the file is in your home folder (where wget puts it), run:

Terminalbash
bash ~/Anaconda3-2026.07-1-Linux-x86_64.sh

If you saved it in your Downloads folder, use ~/Downloads/ in the path instead. Version numbers change, so adjust the file name to the one you downloaded. An easy way around that is typing bash ~/Downloads/Anaconda and hitting the tab key for auto-completion.

Install Anaconda on Ubuntu

After pressing Enter, press Return to continue to the license agreement. The Terms of Service are at anaconda.com/legal. When you reach the end, write yes into your terminal window and press enter to accept them.

After this, you will get asked where you want to install Anaconda on Ubuntu. The default is /home/USER/anaconda3. You can just leave this as default and press enter to start the installation. It can take a few minutes.

Install Anaconda on Ubuntu

Step 5 - Activating the Installation

After the installation process is finished, type yes into the terminal a final time to run conda init:

Install Anaconda on Ubuntu

Then open a new terminal, or run the following to be able to use Conda commands:

Terminalbash
source ~/.bashrc

Or if you use ZSH, use:

Terminalbash
source ~/.zshrc

When it worked, you see (base) at the start of your prompt. That means you are in the base environment.

Step 6 - Testing the Installation

We can use the conda list command to test if our installation & activation was successful:

Terminalbash
conda list
Testing Conda Commands

Step 7 - Update Anaconda

To make sure we are running the latest version of conda, run the following:

Terminalbash
conda update --name base conda

Confirm with y if you get asked if you want to proceed. The screenshot below still shows the older -c defaults form of this command.

The first time you install or update packages, conda may ask you to accept Anaconda’s Terms of Service for its default channels. You can accept them in one go with conda tos accept.

Update Anaconda

Create Anaconda Environment

Now we can create a new development environment. Hit y to proceed after entering the command below.

Terminalbash
conda create --name new_environment python=3
Create Anaconda Environment

Activate Anaconda Environment

And finally, we activate the environment. The screenshot below shows the old source activate form. Today you use conda activate:

Terminalbash
conda activate new_environment

To leave the environment again, run conda deactivate.

Activate Anaconda Environment

FAQ

Is Anaconda free to use?

Anaconda’s install docs say you might need a license to comply with its Terms of Service, which matters mostly for commercial use. Read the terms at anaconda.com/legal before using it at work.

Why do I get “conda: command not found” after installing?

Your shell has not picked up the conda init changes yet. Open a new terminal or run source ~/.bashrc (or source ~/.zshrc). If it still fails, run ~/anaconda3/bin/conda init and reload the shell again.

How do I stop the (base) environment from loading in every terminal?

Run conda config --set auto_activate_base false. You can then switch to the base environment manually with conda activate whenever you need it.

What do I do when the installer says “File or directory already exists”?

Do not use the -u or -f flags. Anaconda’s docs warn that they do not perform a true update and can break the installation. Uninstall and reinstall cleanly instead.

Which installer do I need, x86_64 or aarch64?

Use x86_64 on a normal Intel or AMD machine. Use aarch64 on ARM64 systems such as AWS Graviton. The Anaconda docs warn that the aarch64 builds might not work on some Raspberry Pi setups.

Summary

This is everything you need to do when you want to install Anaconda on Ubuntu. You should now have a fully working Anaconda Environment within a few simple steps. To summarize:

  • You need to download Anaconda
  • You need to install Anaconda
  • You need to activate the Anaconda installation
  • You need to update Anaconda

🐍 Learn Python Programming 🔨 Python Basics
👉 Python Syntax 👉 Python Variables 👉 Python print() 👉 Python input() 👉 Python Constants 👉 Python Comments ⚙️ Python Specifics
👉 Filter Lists in Python 👉 Replacing List Items in Python 👉 Create a GUI in Python 👉 Find out the Length of a String in Python 👉 Enum in Python 👉 Python Inline If/Else One-Line Statements 👉 Python xrange() 👉 Python List Slicing 🏋️ Python Exercises
👉 Python Exercise Collection

whoami

Stefan founded Ceos3c in 2016 and has spent a decade teaching cybersecurity, Linux, and web development through hands-on tutorials. He builds and ships real products while sharing his journey: ProofSwap.me, XPMetric.com, and EasyEarningsTracker.com.

More about me

6 thoughts on “Install Anaconda on Ubuntu – Complete Step-by-Step Guide”

  1. This tutorials is very helpful for machine learning.........!!Thanks lots....................!!!!!

  2. I had the same problem. The problem is pressing Enter instead yes here:

    Do you wish the installer to prepend the Anaconda3 install location
    to PATH in your /home/pavlenty/.bashrc ? [yes|no]
    [no] >>>

    Try to update anaconda with "bash Anaconda3-5.0.1-Linux-x86_64.sh -u". This time you should enter yes.

  3. I got the same message but it was resolved when I ran the command:

    export PATH=/home//anaconda3/bin:$PATH

    Note: Remember to change accordingly!

Comments are closed. I keep the discussion here because the answers still help.