We need to check the Jenkins version for reasons such as compatibility with plugins, integrations, and dependencies. Additionally, we need to know the Jenkins version to determine if we can work with a specific Jenkins feature.
We can check for a version of Jenkins through:
Jenkins UI
Terminal or CLI tool.
To check for a version of Jenkins on the operating system, here are the steps:
Start a Jenkins instance by opening the terminal or CMD tool and entering the following command:
jenkins
Once Jenkins is fully up and running without issues, open http://localhost:8080/
in the browser. If you have configured the port number for Jenkins, change 8080 to the new port number.
A log in page pops up to which enter the username and password then log in.
On the next page after logging in, check the bottom of the page for the Jenkins version number.
To check for the Jenkins version via terminal, open the terminal and enter the following command:
jenkins --version
However, if Jenkins is installed through a .war
file, we have to use the following command:
java -jar /usr/lib/jenkins/jenkins.war --version
That’s it! with this Answer, we can check the version of Jenkins installed on the computer.
Note: These instructions work with Windows, Linux, and Mac OS.