How to Install Anaconda in Ubuntu 22.04

Anaconda is an open-source platform used to handle data science and machine learning workflows. With more than 7500 scientific packages, this framework assists in processing large-scale data, predictive analysis, and scientific computing and you do not have to worry about installing them separately with their dependencies. It is also considered an integrated Python environment.

This write-up will discuss the procedure to install Anaconda in Ubuntu 22.04. So, let’s start!

How to Install Anaconda in Ubuntu 22.04

To install Anaconda in Ubuntu 22.04, you must follow the below-given step-by-step instructions.

Step 1: Update system repositories

Press “CTRL+ALT+T” to open the terminal of your Ubuntu 22.04 and run the below-given command to update system repositories:

$ sudo apt update

Step 2: Install curl package

In the next step, we will download the “curl” utility as it permits fetching the installation script of Anaconda:

$ sudo apt install curl -y

Step 3: Prepare Anaconda Installer

Switch to the “/tmp” directly with the help of the “cd” command to make it your present working directory:

$ cd /tmp

After that, utilize the following “curl” command for downloading the Anaconda installer script. Also, make sure you download the latest version by firstly visiting their official site:

$ curl --output anaconda.sh https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh

Then, match the “SHA-256” checksum of the downloaded Anaconda script with the code displayed on the official site:

$ sha256sum anaconda.sh

Step 4: Install Anaconda on Ubuntu 22.04

Till this point, we have fulfilled all prerequisites, and our Ubuntu 22.04 is all ready for the installation of Anaconda. To do so, run the downloaded Anaconda installer script:

$ bash anaconda.sh

Upon doing so, the Anaconda installation wizard will appear on the terminal; press “Enter” to continue:

Carefully read the Anaconda End User License Agreement:

After reading the License agreement of Anaconda, type out “yes” to move ahead:

Specify the directory location of your Ubuntu 22.04 system where you want to save the files related to the Anaconda installation. In our case, we have selected the “/home/linuxhint/anaconda3” directory:

Wait for a few minutes as the Anaconda installation will take some time to complete:

The below-given output signifies that we have successfully installed Anaconda on Ubuntu 22.04:

Step 5: Activate the Environment settings

After installing Anaconda, the next step is to activate the added environment settings in the “.bashrc” file by executing the following command:

$ source ~/.bashrc

Step 6: Verify the Anaconda installation

Lastly, execute the below-given “conda” command to verify if Anaconda is working on your Ubuntu 22.04 system:

$ conda list

Or check out the installed version of Anaconda by typing out “conda” command with the “–version” option:

$ conda --version

As you can see from the given output, we have “conda 4.5.11” installed on our Ubuntu 22.04:

How to remove Anaconda from Ubuntu 22.04

In the terminal, you can write out the following command to remove Anaconda from your system:

$ rm -rf ~/anaconda3

We have provided the basic method to install Anaconda on Ubuntu 22.04. After installation, you can explore this platform as required.


To install Anaconda in Ubuntu 22.04, download the Anaconda installer file with the “$ curl –output anaconda.sh https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh” command, then install the “bash anaconda.sh” script and verify using “conda list” or “conda –version” commands. This write-up discussed the procedure of installing Anaconda on Ubuntu 22.04. Give it a try and step into the world of data science learning.

About the author

Sharqa Hameed

I am a Linux enthusiast, I love to read Every Linux blog on the internet. I hold masters degree in computer science and am passionate about learning and teaching.