How To Install parallel on Ubuntu 20.04

In this tutorial we learn how to install parallel on Ubuntu 20.04. parallel is build and execute command lines from standard input in parallel

Introduction

In this tutorial we learn how to install parallel on Ubuntu 20.04.

What is parallel

GNU Parallel is a shell tool for executing jobs in parallel using one or more machines. A job is typically a single command or a small script that has to be run for each of the lines in the input. The typical input is a list of files, a list of hosts, a list of users, or a list of tables.

If you use xargs today you will find GNU Parallel very easy to use. If you write loops in shell, you will find GNU Parallel may be able to replace most of the loops and make them run faster by running jobs in parallel. If you use ppss or pexec you will find GNU Parallel will often make the command easier to read.

GNU Parallel also makes sure output from the commands is the same output as you would get had you run the commands sequentially. This makes it possible to use output from GNU Parallel as input for other programs.

There are three ways to install parallel on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install parallel Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install parallel using apt-get by running the following command:

sudo apt-get -y install parallel

Install parallel Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install parallel using apt by running the following command:

sudo apt -y install parallel

Install parallel Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install parallel using aptitude by running the following command:

sudo aptitude -y install parallel

How To Uninstall parallel on Ubuntu 20.04

To uninstall only the parallel package we can use the following command:

sudo apt-get remove parallel

Uninstall parallel And Its Dependencies

To uninstall parallel and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove parallel

Remove parallel Configurations and Data

To remove parallel configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge parallel

Remove parallel configuration, data, and all of its dependencies

We can use the following command to remove parallel configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge parallel

References

Summary

In this tutorial we learn how to install parallel on Ubuntu 20.04 using different package management tools like apt, apt-get and aptitude.