How to install Jenkins on Ubuntu 18.04

Jenkins is an open source automation server that has several plugins to support building, deploying and automating any project with ease.

In today’s tutorial let’s take a look at how to install and configure Jenkins on Ubuntu. Jenkins is an open source automation server and it helps to set up continuous integration and continuous delivery (CI/CD) pipeline.

The Jenkins project was started in 2004 and originally called Hudson. The biggest advantage of using Jenkins is the availability of hundreds of plugins to support building, deploying and automating any project with ease.

Installing Jenkins on Ubuntu


  • A computer with at least 512MB RAM (recommended) and 10 GB of drive space
  • Supported software: Java 8 (either a JRE or Java Development Kit (JDK)

1. Installing Java

According to Jenkins official web site, Java 8 is the ONLY currently supported runtime environment. older versions of Java are not supported. Java 9 and Java 10 are not supported.

Install Java 8 repository

sudo add-apt-repository ppa:webupd8team/java

Update repository list

sudo apt update

Install Java 8

sudo apt install oracle-java8-set-default

When you see the prompt for the license agreement, select “yes” and continue.

2. Installing Jenkins

Launch the Terminal and enter the following command to add Ubuntu repository of Jenkins and also its key to your system.

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

Then add the following entry in your /etc/apt/sources.list

Edit sources.list file

sudo vim /etc/apt/sources.list

Add the following line to the end of the file.

deb binary/

Save and close the file.

Update system and install Jenkins.

sudo apt-get update
sudo apt-get install jenkins

Enable Jenkins on system boot.

sudo systemctl enable jenkins.service

Modify firewall settings to allow 8080 port.

sudo ufw allow 8080

Reload firewall and then check its status.

sudo ufw  reload
sudo ufw status

3. Configuring Jenkins

Open a web browser and type Server IP address followed by port 8080.

Browse Jenkins
Jenkins Initial Admin Password

Then copy admin password from a file.

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

Jenkins Password

Enter administrator password and click enter. Then you will get the Plugin install window.

Install Plugins
Install Plugins

You can select ‘Install suggested plugins’ if you don’t need any customization, as this option will install all those plugins that the Jenkins community finds most useful. If you want to choose only those plugins that you really need and avoid the rest, ‘Select plugins to install’.

Here we are going ahead with the first option, that is to install all the suggested plugins.

After the plugin installation, Jenkins will ask to create a first admin user. Enter the username, password, full name and email address for the user.

First Admin User
Create First Admin User

Click ‘Save and Continue’

On the next page, you will be asked to enter the Jenkins URL.

Instance URL Configurations

Click save and Finish button to complete setup.

Jenkins Ready
Jenkins Ready

Now click ‘Start using Jenkins’ and it will redirect to Jenkins Dashboard.

Jenkins Home
Jenkins DashBoard

Your Jenkins installation is now successfully completed. If you have any questions please comment below and we will be glad to discuss.

Hey! I'm Darshana, a Linux / DevOps Engineer and also a contributor to FOSS Linux. I enjoy working on various kind of Linux distributions and cloud technologies. During my free time, I love to swim and hike across nature trails. Linux is my love and I'm here to share all my learnings with all of you! Hope you enjoyed reading my article.


Please enter your comment!
Please enter your name here




How to create an Arch Linux Live USB drive on Ubuntu

create Arch Linux Live USB drive
This article provides a step-by-step guide on creating an Arch Linux USB installation media on Ubuntu PC. The Live USB media can be used to install Arch Linux.
terminate frozen app
For dealing with a frozen app or desktop, you can't use the CTRL+ALT+DEL in Linux system. Instead, there are powerful alternatives that come in handy in frustrating situations. We pick the best methods available for you.
encrypt files linux
Privacy is something that almost all of us have concerns about. Many people switch over to Linux because of its better privacy features. In this time, where many people believe (quite rightly so) that privacy doesn't exist anymore, Linux provides a ray of hope. Distributions like Tails OS are specifically designed for that purpose.