How to Install Jenkins on Ubuntu 24.04 LTS (Step-by-Step Guide for Beginners)

Arief ShaikArief Shaik
3 min read

What is Jenkins ?

Jenkins is one of the most popular open-source automation servers used in DevOps. It helps automate the build, test, and deployment process, making software delivery faster and more reliable. In this guide, I’ll walk you through walk you through installing Jenkins on Ubuntu 24.04 LTS, step by step — ideal for beginners in DevOps.

Prerequisites :

Make sure you have:

  • A system running Ubuntu 24.04 LTS

  • A non-root user with sudo privileges

  • Internet access

Step 1: Update the System

sudo apt update && sudo apt upgrade -y

Keep your system up to date with the latest security and software patches.

Step 2: Install Java (Required by Jenkins)

Jenkins requires Java.

sudo apt install openjdk-21-jdk -y

Verify the installation:

java -version

Expected output:

openjdk version "21.x.x" ...

Step 3: Add Jenkins Repository & GPG Key

sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/etc/apt/keyrings/jenkins-keyring.asc]" \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null

Step 4: Install Jenkins

sudo apt-get update
sudo apt-get install jenkins

Step 5: Start Jenkins

You can enable the Jenkins service to start at boot with the command:

sudo systemctl enable jenkins

You can start the Jenkins service with the command:

sudo systemctl start jenkins

You can check the status of the Jenkins service using the command:

sudo systemctl status jenkins

Step 6: Post-installation setup wizard

After downloading, installing and running Jenkins using one of the procedures above (except for installation with Jenkins Operator), the post-installation setup wizard begins.

This setup wizard takes you through a few quick "one-off" steps to unlock Jenkins, customize it with plugins and create the first administrator user through which you can continue accessing Jenkins.

Unlocking Jenkins

When you first access a new Jenkins controller, you are asked to unlock it using an automatically-generated password.

  1. Browse to http://localhost:8080 (or whichever port you configured for Jenkins when installing it) and wait until the Unlock Jenkins page appears.

    • The command: sudo cat /var/lib/jenkins/secrets/initialAdminPassword will print the password at console.

    • On the Unlock Jenkins page, paste this password into the Administrator password field and click Continue.Step 8: Install Suggested Plugins.

Step 8: Install Suggested Plugins

This will install common plugins like Git, Pipeline, etc. You can always install more later.

Step 9: Create Admin User

Fill in the form to create your first Jenkins user and complete the setup.

keep the Jenkins URL as it is and click on save and finish.

Jenkins is ready

click on start using Jenkins.

Conclusion :

Installing Jenkins on Ubuntu 24.04 LTS is fairly straightforward. With this setup, you're ready to dive into automation, continuous integration, and deployment workflows.

If you're a DevOps beginner, Jenkins is a great way to start learning real-world tools.

#jenkins #devops #ubuntu #cicd #linux


0
Subscribe to my newsletter

Read articles from Arief Shaik directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Arief Shaik
Arief Shaik

I’m a passionate DevOps and cloud enthusiast with hands-on experience in building and automating modern infrastructure using tools like Docker, Terraform, Jenkins, and GitHub Actions. My core skill set includes Java, Python, shell scripting, and deploying containerized applications on Azure and AWS. I actively work on real-world projects involving CI/CD, infrastructure as code, cloud deployment, and Linux automation. Driven by curiosity and consistency, I enjoy turning complex problems into simple, automated solutions. I’m always exploring new technologies and looking to contribute to open-source projects and collaborate with the developer community.