Upgrade Jenkins in Unix OS

We can follow the below steps to upgrade Jenkins in Unix OS -

Step 1

Stop the jenkins service:

sudo systemctl stop jenkins

Step 2

Navigate to the directory where the jenkins.war file is located, and take its backup. You can maybe rename that file:

sudo mv jenkins.war jenkins.war.bk_6_17_2022

Step 3

Download the latest jenkins.war file in the same directory:

sudo wget https://updates.jenkins-ci.org/latest/jenkins.war

Step 4

Change the ownership of the file to root user:

sudo chown root:root jenkins.war

Step 5

Finally, start the jenkins service:

sudo systemctl start jenkins

We can check the status of the service:

sudo systemctl status jenkins

Thanks for your time.