How to install Anaconda on Ubuntu 18.04

In this article, we want to teach you how to install Anaconda on Ubuntu 18.04. Let’s see what Anaconda is first.

What is Anaconda?

Anaconda is a free and open-source distribution of the programming languages Python and R. The distribution comes with the Python translator and various packages related to machine learning and data science.
Basically, the idea behind Anaconda is to make it easy for people interested in those fields to install all (or most) of the packages needed with a single installation.

Let’s start to install Anaconda on Ubuntu 18.04.

How to install Anaconda on Ubuntu 18.04

Get the latest version of Anaconda

You can get the latest version of Anaconda by going to the Anaconda Distribution page or following the link below:

When you get into the page find the latest Linux version and copy the installer bash script.

Download the Anaconda bash script

For downloading the Anaconda bash script on Ubuntu 18.04 log in as a non-root user that has access to root privileges with sudo to your Ubuntu 18.04 server.
Use the following commands:

cd /tmp
curl -O

Note: in the curl command put the link of the latest version that you have copied.

Verify the data entirety of the installer

In this step you can verify the data entirety of the installer with the SHA-256 checksum:


Run the Anaconda script on Ubuntu 18.04

For running the Anaconda script type the following command:


In your output, you will review the license agreement press Enter to end, and type yes to accept them to complete the installation.

At this point, you should choose the location of the installation. You can press Enter to accept the default location.

Note: the installation process may take some time.

Now the installation is completed. And in your output you may receive that use the conda command, type yes to accept.

Active installation

You can active the installation with the following command:

source ~/.bashrc

Test installation

In this step you can test the installation and activation of Anaconda on Ubuntu 18.04 with the following command:

conda list

In your output, you can see available packages for Anaconda installation.

Set up Anaconda environments

Here you can set up an Anaconda environment with the conda create command.
For example:

conda create --name your-env python=3

Then active your environment:

conda activate your-env

Now it’s ready to use.


At this point, you learn How to install the Anaconda and run its bash script on Ubuntu 18.04.

Hope you enjoy this article about how to install Anaconda on Ubuntu 18.04.


Please enter your comment!
Please enter your name here

Latest Articles


Most Popular