Languages
[Edit]
EN

Bash - how to check Tomcat server version?

2 points
Created by:
Nataniel-Barclay
499

In this short article, we are going to show how to check Tomcat server version under Linux.

The solution is quite simple: go to bin/ directory in Tomcat server installation path and call version.sh script.

Quick solution (run the following command):

/usr/share/tomcat*/bin/version.sh

 

Example paths:

/usr/share/tomcat10/bin/version.sh
/usr/share/tomcat9/bin/version.sh
/usr/share/tomcat8/bin/version.sh

Note: the above paths should be working for Debian/Ubuntu family Linuxes when Tomcat server was installed with default packages manager - in other distributions or cases do the below Simple steps.

 

Simple steps:

  1. find Tomcat server installation directory using:
    find / -type d -name "tomcat*"
    or call whereis tomcat9 replacing 9 with major version number (7, 8, 9, 10, etc.),
  2. go to bin/ directory using:
    cd /path/to/tomcat/bin
  3. run version.sh script using:
    ./version.sh
  4. find the line started with Server version:.

 

Practical example

1. Finding Tomcat server installation directory:

root@debian-server:~# find / -type d -name "tomcat*"

Example output:

/etc/tomcat8
/var/cache/tomcat8
/var/lib/tomcat8
/var/log/tomcat8
/usr/share/tomcat8-root
/usr/share/doc/tomcat8-common
/usr/share/doc/tomcat8
/usr/share/tomcat8
/sys/fs/cgroup/pids/system.slice/tomcat8.service
/sys/fs/cgroup/devices/system.slice/tomcat8.service
/sys/fs/cgroup/systemd/system.slice/tomcat8.service

 

2. Going to bin/ directory:

root@debian-server:~# cd /usr/share/tomcat8/bin

 

3. Runing version.sh script:

root@debian-server:/usr/share/tomcat8/bin# ./version.sh

Example output:

Using CATALINA_BASE:   /usr/share/tomcat8
Using CATALINA_HOME:   /usr/share/tomcat8
Using CATALINA_TMPDIR: /usr/share/tomcat8/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar
Server version: Apache Tomcat/8.5.54 (Debian)
Server built:   Apr 25 2020 15:01:31 UTC
Server number:  8.5.54.0
OS Name:        Linux
OS Version:     4.9.0-11-amd64
Architecture:   amd64
JVM Version:    1.8.0_252-8u252-b09-1~deb9u1-b09
JVM Vendor:     Oracle Corporation

 

4. Finding the Server version:

Apache Tomcat/8.5.54 (Debian)

 

See also

  1. Spring Boot - checking Tomcat version (Maven command) 

Alternative titles

  1. Bash - check standalone Tomcat server version
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Bash

Bash - check tomcat version
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join