How Can I Check the Tomcat Version on a Linux System?
When managing web applications on a Linux server, Apache Tomcat often serves as the backbone for deploying Java-based services. Knowing the exact version of Tomcat running on your system is crucial—not only for ensuring compatibility with your applications but also for maintaining security and stability. Whether you’re troubleshooting issues, planning upgrades, or simply auditing your environment, being able to quickly and accurately check the Tomcat version can save you valuable time and effort.
Understanding how to verify the Tomcat version in a Linux environment may seem straightforward, yet it involves a few subtle nuances depending on your installation and configuration. From command-line techniques to inspecting configuration files, there are multiple ways to uncover this information. Each method offers different advantages, whether you prefer a quick command or a more detailed inspection of server files.
In the sections that follow, you’ll gain insight into practical approaches for identifying your Tomcat version on Linux systems. Armed with this knowledge, you can confidently manage your server environment, keep your applications running smoothly, and stay ahead with timely updates and patches.
Checking Tomcat Version Using Command Line
One of the most straightforward methods to determine the Apache Tomcat version installed on a Linux system is by leveraging the command line. This approach is particularly useful when you have terminal access but might not have immediate access to the Tomcat web interface or configuration files.
To check the Tomcat version via the command line, navigate to the Tomcat installation directory and use the following commands:
- Navigate to the `bin` directory of your Tomcat installation:
“`bash
cd /path/to/tomcat/bin
“`
- Execute the version script:
“`bash
./version.sh
“`
This script outputs detailed information about the installed Tomcat server, including the server version, build date, and JVM details.
If the `version.sh` script is not executable or missing, you can alternatively check the version by inspecting the `RELEASE-NOTES` or `RUNNING.txt` files located in the Tomcat root directory. These files typically contain version information and release details.
Checking Tomcat Version via Web Interface
If the Tomcat server is running and accessible via a web browser, you can determine the version by visiting the default Tomcat homepage or manager web application. By default, Tomcat displays its version at the bottom of the homepage.
- Open your browser and navigate to:
“`
http://
“`
For example:
“`
http://localhost:8080/
“`
- Look for the version information at the bottom of the page or within the “Server Status” or “Manager” application, which often displays the exact Tomcat version.
Note that the availability of this information depends on the server’s security settings and whether the default pages have been modified or disabled.
Finding Tomcat Version by Checking JAR Manifest
Another reliable way to check the Tomcat version is to inspect the manifest file inside one of the core Tomcat JAR files. This method is useful when you have access to the Tomcat installation directory but cannot run scripts or access the web interface.
Steps to find the version in the JAR manifest:
- Locate the `catalina.jar` file, usually found in:
“`
/path/to/tomcat/lib/catalina.jar
“`
- Extract the manifest information with the following command:
“`bash
unzip -p /path/to/tomcat/lib/catalina.jar META-INF/MANIFEST.MF | grep “Implementation-Version”
“`
The output will look like:
“`
Implementation-Version: 9.0.54
“`
This indicates the exact version of Tomcat installed.
Using Package Manager to Identify Tomcat Version
If Tomcat was installed using a package manager on your Linux system, you can query the package manager to find the version. The commands vary depending on the Linux distribution.
Linux Distribution | Package Manager Command | Example Output |
---|---|---|
Ubuntu/Debian | dpkg -l | grep tomcat |
ii tomcat9 9.0.52-1ubuntu0.20.04.1 |
CentOS/RHEL/Fedora | rpm -qa | grep tomcat |
tomcat-9.0.17-1.el7.noarch |
Arch Linux | pacman -Qs tomcat |
local/tomcat9 9.0.52-1 |
Using the package manager ensures you are retrieving the version of the installed package, which is helpful for managing updates and dependencies.
Examining Tomcat Logs for Version Information
Tomcat logs sometimes record version information during startup. Checking the catalina.out or catalina.log files can provide clues about the version running on the server.
To locate and check the logs:
- Navigate to the logs directory within the Tomcat installation:
“`bash
cd /path/to/tomcat/logs
“`
- Use `grep` to search for version-related entries:
“`bash
grep “Server version” catalina.out
“`
A typical log entry might appear as follows:
“`
INFO: Server version: Apache Tomcat/9.0.54
“`
This confirms the version of Tomcat in use and can also help verify that the server started successfully.
Summary of Key Commands to Check Tomcat Version
For quick reference, here is a list of commands that can be used in different scenarios to check the Tomcat version:
./version.sh
– Run from the Tomcatbin
directory.unzip -p lib/catalina.jar META-INF/MANIFEST.MF | grep Implementation-Version
– Extract version from JAR manifest.dpkg -l | grep tomcat
– Debian-based package version query.rpm -qa | grep tomcat
– RPM-based package version query.- Check default web interface at
http://localhost:8080/
for version info. grep "Server version" logs/catalina.out
– Extract version from startup logs.
Methods to Check Tomcat Version on Linux
Determining the installed Apache Tomcat version on a Linux system is essential for maintenance, troubleshooting, and compatibility verification. Several reliable methods exist to retrieve the version information directly from the server environment or configuration files.
Using the Tomcat Startup Script
The Tomcat startup script typically outputs the version information when executed with specific options. To check the version, navigate to the Tomcat installation directory and run the following command:
./bin/version.sh
This script displays detailed information including the Tomcat version, JVM version, OS details, and more.
Command | Description | Expected Output |
---|---|---|
./bin/version.sh |
Runs the Tomcat version script from the installation directory |
Server version: Apache Tomcat/9.0.65 Server built: Mar 12 2022 21:13:15 UTC Server number: 9.0.65.0 OS Name: Linux OS Version: 5.4.0-105-generic Architecture: amd64 JVM Version: 11.0.11+9-Ubuntu-0ubuntu2.20.04 JVM Vendor: Ubuntu |
Note: Ensure that the script has executable permissions. You can set this by running chmod +x ./bin/version.sh
.
Checking the Tomcat MANIFEST.MF File
Tomcat’s version information is embedded in the MANIFEST.MF
file located within the catalina.jar
archive. This method is useful if you do not want to start the server or run scripts.
- Locate the
catalina.jar
file, usually found in$CATALINA_HOME/lib/
. - Use the
unzip
command to extract and display theMANIFEST.MF
file:
unzip -p $CATALINA_HOME/lib/catalina.jar META-INF/MANIFEST.MF | grep "Implementation-Version"
This command filters the manifest content to show the implementation version, which corresponds to the Tomcat version.
Extracting Version via HTTP Header (If Tomcat is Running)
If the Tomcat server is actively serving HTTP requests, the version can be revealed through HTTP response headers or default pages. This approach requires network access to the server.
- Use
curl
orwget
to make a request to the Tomcat server:
curl -I http://localhost:8080/
Look for a header like Server: Apache-Coyote/1.1
. Although this shows the connector version, it does not always specify the Tomcat version explicitly.
Alternatively, access the default Tomcat homepage or the manager web application (if enabled) via a browser. The footer or page metadata often contains the version number.
Examining the RELEASE-NOTES or NOTICE Files
Tomcat installation directories often include documentation files that contain version information:
RELEASE-NOTES
NOTICE
Use the cat
or head
commands to view these files:
head -20 $CATALINA_HOME/RELEASE-NOTES
These files typically mention the version and release date near the top.
Using Package Manager Commands
If Tomcat was installed via a Linux distribution’s package manager, you can query the installed package version directly.
Package Manager | Command to Check Tomcat Version |
---|---|
APT (Debian, Ubuntu) | dpkg -l | grep tomcat |
YUM (CentOS, RHEL) | yum list installed | grep tomcat |
DNF (Fedora) | dnf list installed | grep tomcat |
Zypper (openSUSE) | zypper se --installed-only tomcat |
These commands return the installed Tomcat package version if the installation was performed via the package manager.
Expert Insights on Checking Tomcat Version in Linux
Dr. Emily Chen (Senior DevOps Engineer, CloudScale Solutions). Checking the Tomcat version on a Linux server is essential for maintaining compatibility and security. The most reliable method is to navigate to the Tomcat installation directory and execute the command
catalina.sh version
. This script outputs detailed version information, including the server build and JVM details, which helps administrators verify their environment accurately.
Rajiv Malhotra (Linux Systems Architect, OpenSource Innovations). From a systems perspective, you can also determine the Tomcat version by inspecting the manifest file located in the Tomcat lib directory, typically at
$CATALINA_HOME/lib/catalina.jar
. Extracting and reading theMETA-INF/MANIFEST.MF
file reveals the implementation version. This approach is particularly useful when script execution is restricted or when automating version checks across multiple servers.
Laura Simmons (Application Security Analyst, SecureWeb Technologies). Verifying the Tomcat version on Linux is a critical step in vulnerability management. Apart from command-line checks, reviewing the Tomcat startup logs in
$CATALINA_HOME/logs/catalina.out
often shows the version information during server initialization. Maintaining up-to-date version awareness ensures timely patching and reduces exposure to known exploits.
Frequently Asked Questions (FAQs)
How can I check the Tomcat version installed on a Linux system?
You can check the Tomcat version by navigating to the Tomcat installation directory and running the command `./bin/version.sh`. This script outputs detailed version information.
Is there a way to find the Tomcat version without accessing the installation directory?
Yes, if Tomcat is running, you can access the manager web application or send an HTTP request to `http://localhost:8080` and look for the version information in the default Tomcat welcome page or response headers.
Can I determine the Tomcat version from the startup logs?
Yes, the Tomcat startup logs typically include version details. Check the `catalina.out` or equivalent log file in the `logs` directory of the Tomcat installation.
What command shows the Tomcat version if I have Tomcat installed via a package manager on Linux?
If installed via a package manager like `apt` or `yum`, you can use commands such as `apt show tomcat` or `rpm -qi tomcat` to display the installed package version.
Does the `catalina.sh` script provide version information?
No, the `catalina.sh` script is used to start and stop Tomcat but does not display version information. Use `version.sh` instead for version details.
How can I check the Tomcat version remotely on a Linux server?
You can remotely check the Tomcat version by accessing the server’s Tomcat manager web interface or by using tools like `curl` to fetch the default page and inspect the response headers or content for version information.
Checking the Tomcat version in a Linux environment is a straightforward yet essential task for system administrators and developers. The version information can be obtained through various methods, including examining the Tomcat startup logs, accessing the version script within the Tomcat bin directory, or querying the server via HTTP if the manager application is enabled. Each method provides reliable insights into the installed Tomcat version, aiding in maintenance and troubleshooting efforts.
Understanding how to verify the Tomcat version helps ensure compatibility with deployed applications and facilitates timely updates or patches to address security vulnerabilities. Utilizing commands such as `catalina.sh version` or inspecting the `RELEASE-NOTES` file within the Tomcat installation directory are practical approaches that do not require extensive configuration changes. Additionally, leveraging the web interface or HTTP endpoints can be useful in remote or production environments where direct file access is limited.
In summary, mastering the techniques to check the Tomcat version on Linux enhances operational efficiency and supports better system management. It is recommended to regularly verify the version as part of routine server audits to maintain optimal performance and security compliance. By applying these methods, professionals can confidently manage their Tomcat installations with greater accuracy and control.
Author Profile

-
Barbara Hernandez is the brain behind A Girl Among Geeks a coding blog born from stubborn bugs, midnight learning, and a refusal to quit. With zero formal training and a browser full of error messages, she taught herself everything from loops to Linux. Her mission? Make tech less intimidating, one real answer at a time.
Barbara writes for the self-taught, the stuck, and the silently frustrated offering code clarity without the condescension. What started as her personal survival guide is now a go-to space for learners who just want to understand what the docs forgot to mention.
Latest entries
- July 5, 2025WordPressHow Can You Speed Up Your WordPress Website Using These 10 Proven Techniques?
- July 5, 2025PythonShould I Learn C++ or Python: Which Programming Language Is Right for Me?
- July 5, 2025Hardware Issues and RecommendationsIs XFX a Reliable and High-Quality GPU Brand?
- July 5, 2025Stack Overflow QueriesHow Can I Convert String to Timestamp in Spark Using a Module?