How to Install Jenkins on Ubuntu

Websolutionstuff | Aug-07-2023 | Categories : Other

In today's fast-paced software development landscape, I've understood the significance of continuous integration and continuous delivery (CI/CD) in ensuring the swift and reliable delivery of high-quality software.

Among the plethora of tools available, Jenkins stood out as one of the most popular and versatile automation servers, promising to easily automate our build, test, and deployment processes.

As an Ubuntu user looking to harness the power of Jenkins for my projects, I embarked on a journey to install it on my Ubuntu machine. This comprehensive guide documents my step-by-step experience, enabling me to set up a robust CI/CD pipeline quickly.

Whether you're a seasoned DevOps engineer or a curious developer like me, seeking to optimize your development workflow, this article equips you with all the necessary knowledge and instructions to get Jenkins up and running smoothly.

So, let's dive into my world of Jenkins installation on Ubuntu and unlock the potential for faster, more efficient software delivery. Also, you can install Jenkins on Ubuntu 20.04, install Jenkins on Ubuntu 22.04, how to setup Jenkins in Ubuntu, and install Jenkins on Ubuntu using the terminal.


Step 1: Update System Packages

Before starting the Jenkins installation process, it's essential to ensure that your Ubuntu system's package repositories are up to date. Open a terminal and run the following commands.

sudo apt update
sudo apt upgrade


Step 2: Install Java Development Kit (JDK)

Jenkins requires Java to run. Install the Java Development Kit (JDK) on your Ubuntu machine by executing the following command.

sudo apt install default-jdk


Step 3: Add Jenkins Repository Key

Next, add the Jenkins repository key to your system to verify the authenticity of the Jenkins package during installation. Run the following command.

wget -q -O - | sudo apt-key add -


Step 4: Add Jenkins Repository

Now, add the Jenkins repository to the package manager's sources list.

sudo sh -c 'echo deb binary/ > /etc/apt/sources.list.d/jenkins.list'



Step 5: Install Jenkins

Update the package list once again, then install Jenkins.

sudo apt update
sudo apt install jenkins


Step 6: Start Jenkins Service

After the installation is complete, start the Jenkins service.

sudo systemctl start jenkins


Step 7: Enable Jenkins on System Startup

To ensure Jenkins starts automatically upon system boot, enable the service.

sudo systemctl enable jenkins


Step 8: Verify Jenkins Status

Check if Jenkins is running by using the following command.

sudo systemctl status jenkins


Step 9: Access Jenkins Web Interface

Jenkins has a web-based interface accessible through your browser. Open your preferred web browser and enter the following URL.



Step 10: Unlock Jenkins

On your first visit to the Jenkins web interface, you will be prompted to unlock Jenkins. To retrieve the initial admin password, run the following command.


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

Copy the provided password and paste it into the Jenkins web interface to unlock.


Step 11: Install Recommended Plugins

Next, you'll be given the option to install recommended plugins or select specific plugins. Choose the "Install suggested plugins" option to get started quickly.


Step 12: Create Jenkins Admin User

After plugin installation, you'll be prompted to create an admin user. Fill in the required details to set up your Jenkins admin account.



Step 13: Start Using Jenkins

Congratulations! Jenkins is now installed and ready to use. You can start creating your CI/CD pipelines, jobs, and automating your development processes.

That's it! You've successfully installed Jenkins on your Ubuntu system. Enjoy the benefits of automated software delivery with Jenkins' powerful capabilities.


You might also like:

Recommended Post
Featured Post
Change Text Color Based On Background Color Using Javascript
Change Text Color Based On Bac...

In this article, we will see a change text color based on background color using javascript. Sometimes we have requ...

Read More


How To Install React JS Step By Step
How To Install React JS Step B...

In this article, we will see how to install React JS step by step. we will see how to set up an environment fo...

Read More


Disable Sorting On Specific Columns In Datatable
Disable Sorting On Specific Co...

In this article, we will see how to disable sorting on specific columns in datatable. If you want to remove the sor...

Read More


Two Way Data Binding In Angular 12
Two Way Data Binding In Angula...

In this article, we will see how two-way data binding in angular 12. When you create a variable or property to data...

Read More