How to Install Jenkins on Ubuntu 22.04

In this blog post, we will show you how to install Jenkins on Ubuntu 22.04 for seamless DevOps Integration.

In the fast-paced world of DevOps, Jenkins stands out as a powerful and popular automation server that facilitates continuous integration and continuous delivery (CI/CD). If you’re using Ubuntu 22.04 and eager to streamline your development pipeline, then you’re in the right place.



  • A running Ubuntu 22.04 system,
  • A user account with sudo privileges.
  • Internet Connectivity

Without any delay, let’s deep dive into Jenkins installation steps.

1) Install Java

Jenkins is a Java-based application, so you need to install Java Development Kit (JDK). OpenJDK is a widely used option. Open terminal and run below commands to install OpenJDK 17.

Note: OpenJDK and its dependencies are available in the default apt repositories.

$ sudo apt update
$ sudo apt install fontconfig openjdk-17-jre -y


Verify the Java version by running:

$ java -version


2) Add Jenkins Repository

Jenkins is not available in the default package repositories of Ubuntu 22.04. So we will be adding its official apt repository. Execute the following commands.

$ sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \

$ echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null


3) Install Jenkins on Ubuntu 22.04

Now, install Jenkins using the following apt commands.

$ sudo apt update
$ sudo apt install Jenkins -y


4) Start and Enable Jenkins Service

Whenever we install Jenkins using apt command then its service started automatically, to verify Jenkins service status, run following command.


In order to enable jenkins service across the reboot then run beneath systemctl command.

$ sudo systemctl enable Jenkins

Allow Jenkins ports in the firewall in case firewall is enable on your Ubuntu 22.04 system.

$ sudo ufw allow 8080/tcp
$ sudo ufw reload

5) Access Jenkins Setup Wizard

Jenkins runs on port 8080 by default. Open your web browser and navigate to the following URL:



Retrieve the Jenkins unlock key by executing the following command.

$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Copy this password and paste it on “Administrator password” field as show below:


Click on Continue

Once unlocked, select “Install suggested plugins” to ensure a smooth Jenkins experience.



Next, create your admin user and its credentials for Jenkins.


Click on “Save and Continue

In the next window, specify the Jenkins URL; usually, it’s the same as your initial access URL.


Click on “Save and Finish”.


Click on “Start using Jenkins” and this will take us to Jenkins dashboard.


Great, above dashboard confirms that you have successfully installed Jenkins on Ubuntu 22.04.

6) Test Jenkins Installation

In order to test our Jenkins installation, let’s create demo job. Follow the instructions as shown in below image.


That’s all from this post, we hope you have found it useful and informative. Start exploring Jenkins user-friendly interface and configure it according to your project requirements. Kindly do post your feedback and queries in below comments section.

Also Read: How to Install Jenkins on RHEL 9 | Rocky Linux 9 | AlmaLinux 9

Leave a Comment

one × 4 =