How to Upgrade Jenkins on a Linux

Hey everyone!

Hope you are safe and doing great!

In this guide, we will look at the topic - of how to upgrade Jenkins which is installed on a Linux machine. I'm using Ubuntu Server 22.04, but you can use any other distro that you prefer.

Upgrading Jenkins

Log in to your Linux machine and do the commands below:

1. Stop Jenkins service

sudo systemctl stop jenkins

2. Change working directory

cd /usr/share/java

3. Backup Jenkins old version

sudo mv jenkins.war jenkins.war_old

4. Download new Jenkins .war file

sudo wget https://updates.jenkins.io/download/war/latest/jenkins.war

OR you can download some specific version

sudo wget https://updates.jenkins.io/download/war/2.346.1/jenkins.war

5. Start Jenkins service

sudo systemctl start jenkins

You are awesome!

That is it. Hope this short guide helped you and saved your time for the best.

Thank you for reading and see you soon.