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




essential linux commands
Last week, we shared with you several "cool and fun" commands to get comfortable and confident with the Linux command-line. In our quest to further aid Linux users with mastery of the command line, or CLI, we present you with a variety of command-line utilities essential for all Linux users, regardless of proficiency level.
gamemode enable linux
GameMode is a combination of various libraries and daemons that allows all the users to improve the gaming performance on the Linux system. Developed by games publisher Feral Interactive, it improves gaming performance by requesting a group of options that will be applied temporarily to the Linux system.
Ubuntu 19.10 beta overview
It may be early, but I've been looking forward to the release of Ubuntu 19.10 for some time now. As an impatient person, and promised readers in the FOSSLinux article announcing the release of Eoan Ermine that we would provide you a review of Ubuntu 19.10 Eoan Ermine - Beta.  So, here it goes.