×

Install Jenkins on Ubuntu 20.04 - Step by Step Process ?

This article covers how you can install Jenkins on Ubuntu OS. For further information about Jenkins, visit its official documentation.

Jenkins is an open-source automation server that can be used to easily set up continuous integration and continuous delivery (CI/CD) pipelines.

Continuous integration (CI) is a DevOps practice in which team members regularly commit their code changes to the version control repository, after which automated builds and tests are run. 

Continuous delivery (CD) is a series of practices where code changes are automatically built, tested, and deployed to production.


To install Jenkins on Ubuntu 20.04 as a standalone service:

1. Run the following commands as root or user with sudo privileges or root to install OpenJDK 11:

$ sudo apt update
$ sudo apt install openjdk-11-jdk

2. Once the installation is complete, verify it by checking the Java version:

# java -version

3. Import the GPG keys of the Jenkins repository using the following wget command:

# wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -

4. Next, add the Jenkins repository to the system with:

# sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

5. Once the Jenkins repository is enabled, update the apt package list and install the latest version of Jenkins by typing:

# sudo apt update
# sudo apt install jenkins

6. Jenkins service will automatically start after the installation process is complete. You can verify it by printing the service status:

# systemctl status jenkins