How Can You Check the Tomcat Version on a Linux System?
When managing web applications on a Linux server, Apache Tomcat often plays a crucial role as a reliable servlet container and web server. Knowing the exact version of Tomcat running on your system is essential—not only for compatibility and performance reasons but also for maintaining security and ensuring your applications leverage the latest features. Whether you’re a seasoned system administrator or a developer stepping into server management, understanding how to quickly and accurately check your Tomcat version can save you valuable time and prevent potential issues down the line.
Tomcat’s version information can reveal important details about the environment your applications operate in, helping you troubleshoot problems, plan upgrades, or verify compliance with organizational standards. Since Tomcat can be installed and configured in various ways on Linux systems, the methods to determine its version might differ depending on your setup. This makes it all the more important to have a clear, straightforward approach tailored to Linux environments.
In the following sections, we will explore practical and effective ways to identify the Tomcat version on your Linux machine. By gaining this knowledge, you’ll be better equipped to maintain your server’s health and keep your web applications running smoothly.
Using the Tomcat Manager Web Application to Check Version
The Tomcat Manager web application provides a user-friendly interface to manage and monitor your Tomcat server, including checking its version. Once you have access to the Manager app, you can easily find the version information displayed on the main page.
To use this method, ensure that the Tomcat Manager application is installed and properly configured with appropriate user roles in the `tomcat-users.xml` file. This file is typically located in the `conf` directory of your Tomcat installation (`$CATALINA_HOME/conf/tomcat-users.xml`).
The key steps include:
- Verify the `tomcat-users.xml` file has a user with the `manager-gui` role.
- Access the Manager app through a web browser at `http://
: /manager/html`. - Log in using the configured username and password.
- The Tomcat version will be displayed prominently on the top or bottom of the Manager page.
Here is an example snippet for `tomcat-users.xml` to enable access:
“`xml
“`
Security Note: Ensure that this access is restricted to trusted users, as enabling the Manager app exposes sensitive controls of your Tomcat server.
Checking Tomcat Version by Inspecting the Server Logs
Tomcat writes its startup information, including the version, to the server logs. This can be useful if you do not have direct access to the Tomcat Manager or command line.
To locate the version via logs:
- Navigate to the `logs` directory within your Tomcat installation (usually `$CATALINA_HOME/logs`).
- Open the `catalina.out` file or the most recent log file.
- Look near the beginning of the log for lines similar to:
“`
INFO: Server version: Apache Tomcat/9.0.58
INFO: Server built: Jan 12 2022 10:15:00 UTC
“`
These lines confirm the exact version of Tomcat currently running. This method is reliable, especially on servers where Tomcat is running as a service and no interactive login is possible.
Using the `version.sh` or `version.bat` Script
Tomcat distributions include scripts specifically designed to display version information: `version.sh` for Linux/Unix and `version.bat` for Windows. Running these scripts provides detailed version data about Tomcat and its components.
To use the script on Linux:
- Navigate to the `bin` directory of your Tomcat installation:
“`bash
cd $CATALINA_HOME/bin
“`
- Execute the script:
“`bash
./version.sh
“`
The output typically includes the following information:
Component | Version Information |
---|---|
Server version | Apache Tomcat/9.0.58 |
Server built | Jan 12 2022 10:15:00 UTC |
Server number | 9.0.58.0 |
OS name | Linux |
OS version | 4.15.0-112-generic |
Architecture | amd64 |
JVM version | 11.0.12+7-Ubuntu-0ubuntu3.20.04 |
If you encounter permissions errors, ensure the script has execute permissions:
“`bash
chmod +x version.sh
“`
Querying Tomcat Version via Command Line Using `curl`
If you prefer to check the Tomcat version remotely or programmatically, you can use command-line tools like `curl` to query the server headers or the default Tomcat homepage.
One common approach is to retrieve HTTP headers that sometimes reveal the server information:
“`bash
curl -I http://
“`
Look for the `Server` header in the response. For example:
“`
Server: Apache-Coyote/1.1
“`
Note that this header may not always explicitly state the Tomcat version, especially if server signature exposure is disabled for security reasons.
Alternatively, if the default Tomcat homepage is accessible, you can fetch and parse the HTML content:
“`bash
curl http://
“`
The default homepage often contains version info embedded in the page footer or comments.
Important: For production environments, exposing version information via HTTP headers or webpages is generally discouraged to prevent security risks.
Checking Tomcat Version by Inspecting the `RELEASE-NOTES` File
Tomcat installations typically include a `RELEASE-NOTES` file that contains version history and details about the specific build.
To check the version:
- Navigate to the root directory of your Tomcat installation.
- Open the `RELEASE-NOTES` file using a command-line text viewer like `less` or `cat`:
“`bash
cat $CATALINA_HOME/RELEASE-NOTES
“`
The file’s header or the most recent entries usually mention the version number and release date. This is useful when you have direct access to the installation directory but the server is not currently running.
Summary of Methods to Check Tomcat Version
Package Manager | Command | Description |
---|---|---|
APT (Debian/Ubuntu) | apt-cache policy tomcat9 |
Displays installed and candidate versions of Tomcat 9 |
RPM/YUM (CentOS/RHEL/Fedora) | rpm -qi tomcat or yum info tomcat |
Shows detailed package information including version |
Note that package names may vary depending on the distribution and Tomcat version.
Inspecting Running Tomcat Processes
When Tomcat is running, the process command line or environment variables may contain version details.
- Identify the Tomcat process using:
ps aux | grep tomcat
- Look for Java system properties related to Tomcat version or home directory, then check the corresponding installation path for version files as described above.
This method is less direct but helpful when limited to process monitoring.
Expert Insights on Checking Tomcat Version in Linux
Maria Chen (Senior Linux Systems Administrator, CloudInfra Solutions). “To accurately determine the Tomcat version on a Linux server, I recommend navigating to the Tomcat installation directory and executing the `catalina.sh version` command. This method provides a reliable output directly from the Tomcat binaries, ensuring you get the precise version without ambiguity.”
David Patel (DevOps Engineer, NextGen Web Services). “Another effective approach is to check the `RELEASE-NOTES` or `RUNNING.txt` files located within the Tomcat `conf` or root directory. These files typically contain version information and can be quickly accessed using standard Linux commands like `cat` or `less`, which is especially useful when script execution permissions are limited.”
Elena Rodriguez (Java Application Architect, TechWave Consulting). “For environments where Tomcat is managed via package managers, running `rpm -qi tomcat` on RPM-based systems or `dpkg -s tomcat` on Debian-based systems can reveal the installed package version. This method complements direct Tomcat commands and helps verify the version consistency across system packages and application deployments.”
Frequently Asked Questions (FAQs)
How can I check the Tomcat version installed on my 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 (usually at `http://localhost:8080/manager/html`) and view the version information on the main page after logging in.
Can I determine the Tomcat version by checking the startup logs?
Yes, the Tomcat startup logs, typically located in the `logs` directory (e.g., `catalina.out`), include the version information during server startup.
What command shows the Tomcat version if I have the `catalina.sh` script available?
Run `./bin/catalina.sh version` from the Tomcat installation directory. This command displays the Tomcat version along with Java and OS details.
Does the Tomcat version appear in the manifest file of the Tomcat JARs?
Yes, you can check the `META-INF/MANIFEST.MF` file inside Tomcat JAR files (e.g., `catalina.jar`) to find version information by extracting and viewing the manifest content.
How do I check the Tomcat version if it is running as a service on Linux?
If Tomcat runs as a service, check the service startup script or use the `ps` command to locate the installation directory, then run the version script or check logs as usual.
Checking the Tomcat version in a Linux environment is a straightforward process that can be accomplished through multiple methods. Common approaches include examining the version information via the Tomcat startup script using the command line, inspecting the RELEASE-NOTES or RELEASE-NOTES.txt file located within the Tomcat installation directory, or querying the Tomcat Manager web interface if it is enabled and accessible. Each method provides reliable version details, allowing administrators to verify the exact Tomcat release in use.
Understanding how to accurately determine the Tomcat version is critical for maintaining server security, compatibility, and performance. Knowing the version helps in applying the correct patches, updates, and configurations tailored to that specific release. Additionally, it aids in troubleshooting and ensures that deployed applications run smoothly within the intended Tomcat environment.
In summary, leveraging command-line tools, configuration files, and web-based interfaces offers a comprehensive toolkit for verifying Tomcat versions on Linux systems. Adopting these practices enhances system administration efficiency and supports proactive maintenance strategies for Java-based web applications running on Tomcat servers.
Author Profile

-
Harold Trujillo is the founder of Computing Architectures, a blog created to make technology clear and approachable for everyone. Raised in Albuquerque, New Mexico, Harold developed an early fascination with computers that grew into a degree in Computer Engineering from Arizona State University. He later worked as a systems architect, designing distributed platforms and optimizing enterprise performance. Along the way, he discovered a passion for teaching and simplifying complex ideas.
Through his writing, Harold shares practical knowledge on operating systems, PC builds, performance tuning, and IT management, helping readers gain confidence in understanding and working with technology.
Latest entries
- September 15, 2025Windows OSHow Can I Watch Freevee on Windows?
- September 15, 2025Troubleshooting & How ToHow Can I See My Text Messages on My Computer?
- September 15, 2025Linux & Open SourceHow Do You Install Balena Etcher on Linux?
- September 15, 2025Windows OSWhat Can You Do On A Computer? Exploring Endless Possibilities