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. Then, start your Anaconda installation on Ubuntu 18.04.

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.

Quick Guide To Install Anaconda on Ubuntu 18.04

To complete this guide, you must have access to your server as a root or non-root user with sudo privileges. Then, follow the steps below to complete this guide.

Step 1 – 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 to the page, find the latest Linux version and copy the installer bash script.

Step 2 – Download the Anaconda bash script on Ubuntu 18.04

For downloading the Anaconda bash script on Ubuntu 18.04, navigate to the tmp directory and use the following curl command:

# 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:


Step 3 – Run the Anaconda script on Ubuntu 18.04

To run 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. In your output, you may receive that using the conda command, type yes to accept.

Step 4 – Activate Anaconda 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 have learned How to install the Anaconda and run its bash script on Ubuntu 18.04. From there you can create your Anaconda environments activate them and start using them.

Hope you enjoy it. You may like these articles:

Install Anaconda Python on Debian 12 Bookworm

Set up and Use Anaconda on Ubuntu 22.04

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!