This tutorial will help you to install Gradle on Ubuntu 20.04 LTS system. You may like:

How to Install Apache Maven on Ubuntu 20.04 LTS


You must have root or sudo privilege account access on Ubuntu 20.04 system. Gradle required Java language for running on any operating system. So first of all, Make sure you have Java installed on your system. also make sure you have installed JDK and JRE both. If you don’t have Java Development Kit installed on your system. Use below command to install it.

Step 1 – Install Gradle on Ubuntu 20.04

After installation of Java, download the latest Gradle distribution release binary file from its official download page. Then extract the downloaded archive and place it to the proper location. Generally, I used /usr/local directory for storing applications. You can use alternative directory like /opt. Gradle has been configured on your system.

Step 2 – Setup Environment Variable

Next, you need to setup Gradle with PATH environment variable, Also make sure the variable is set after system reboot. Place a shell script under profile.d directory to set PATH variable on reboot. Create a file like below: and add the below line to file Save file and close it. Now source the script to apply environment for current shell. And you have done the Grandle installation on Ubuntu system.

Step 3 – Test Gradle Setup

The Gradle has been configured successfully on your system. You can use use Gradle tool to build your applications. Let’s check the installed version on your system. Output


In this tutorial, you have learned to install Gradle on Ubuntu 20.04 LTS system.