Skip to content

How to Check Tomcat Version on Linux

Advertisement

Q. How do I find the installed Tomcat version on a Linux system?

Tomcat installation directory contains an shell script version.sh for the Linux-based systems and version.bat for Windows systems. This script provides detailed information about the Tomcat version and other useful information. We can use these scripts to find the Tomcat version.

This quick tutorial will help you to find Apache Tomcat version on any Linux-based operating system.

Check Tomcat Version

  1. Use the cd command to switch to the Tomcat installation bin directory. The location of the directory depends on the installation types. The packages installed on the official repository are generally installed under the /etc/tomcat directory. Custom installation is generally done under the /opt or /usr/share directory.
    cd /usr/share/tomcat/bin 
    

    Note: If you still have not found the directory, I have discussed a few methods at the end of this article.

  2. You will find a version.sh script under the bin directory. You can execute this script to find the installed Tomcat version along with a few other details.
    ./version.sh 
    
    Using CATALINA_BASE:   /usr/share/tomcat
    Using CATALINA_HOME:   /usr/share/tomcat
    Using CATALINA_TMPDIR: /usr/share/tomcat/temp
    Using JRE_HOME:        /usr
    Using CLASSPATH:       /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar
    Using CATALINA_OPTS:
    Server version: Apache Tomcat/10.0.23
    Server built:   Jul 14 2022 08:16:11 UTC
    Server number:  10.0.23.0
    OS Name:        Linux
    OS Version:     5.15.0-47-generic
    Architecture:   amd64
    JVM Version:    17.0.1+12-LTS-39
    JVM Vendor:     Oracle Corporation
    

Here is the screenshot of the Tomcat version running on a Ubuntu 22.04 system. I have recently installed it from the source code.

Check Tomcat Version
Check Tomcat Version

Note: If you don’t know the installation directory. You can try the following commands to find it.

find / -type d -name "*tomcat*"
find / -type f -name version.sh

Conclusion

As a best practice to keep servers up to date. With this tutorial you can find the installed Tomcat version on your system and then check the latest available version from official website. This blog post helped you to find the Tomcat version via the command line interface.

Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top