# How to Check Tomcat Version in Linux


Checking the version of Apache Tomcat on your Linux system is a simple but important task. Whether you are managing a server, troubleshooting, or planning an upgrade, knowing the exact Tomcat version helps you make informed decisions. In this article, I’ll guide you through several easy methods to find out which Tomcat version is installed on your Linux machine.

You don’t need to be a Linux expert to follow along. I’ll explain each step clearly and provide commands you can copy and paste. By the end, you’ll be confident in checking your Tomcat version anytime you want.

## Why Knowing Your Tomcat Version Matters

Before diving into the commands, let’s quickly talk about why you should check your Tomcat version regularly.

- **Security:** Older Tomcat versions may have vulnerabilities. Knowing your version helps you decide if you need to update.
- **Compatibility:** Some web applications require specific Tomcat versions to run smoothly.
- **Troubleshooting:** When seeking help or reading documentation, knowing your version ensures you get accurate advice.
- **Feature Awareness:** Newer versions come with improved features and performance. Checking your version helps you stay up to date.

Now, let’s explore the practical ways to check your Tomcat version on Linux.

## Method 1: Using the Tomcat Version Script

Tomcat comes with a built-in script that displays its version. This is often the quickest way.

1. Open your terminal.
2. Navigate to your Tomcat installation directory. This is usually something like `/usr/share/tomcat` or `/opt/tomcat`.
3. Run the version script located in the `bin` folder:

```bash
cd /path/to/tomcat/bin
./version.sh
```

This command outputs detailed information including:

- Server version
- Server built date
- Server number
- JVM version

### Example Output

```
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/java-11-openjdk
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Server version: Apache Tomcat/9.0.73
Server built:   Mar 15 2026 10:00:00 UTC
Server number:  9.0.73.0
OS Name:        Linux
OS Version:     5.15.0-70-generic
Architecture:   amd64
JVM Version:    11.0.19+7-Ubuntu-0ubuntu122.04
JVM Vendor:     Ubuntu
```

This method is reliable and works on most Linux setups.

## Method 2: Checking the Tomcat Logs

If you don’t have direct access to the Tomcat `bin` directory or the version script, you can check the logs.

- Navigate to the Tomcat logs directory, usually `/var/log/tomcat` or `/opt/tomcat/logs`.
- Open the `catalina.out` or `catalina.log` file with a text editor or `less` command:

```bash
less /opt/tomcat/logs/catalina.out
```

- Look near the top of the log file for a line similar to:

```
INFO: Server version: Apache Tomcat/9.0.73
```

This line appears when Tomcat starts and shows the version number.

### Tips for Log Checking

- Use `grep` to quickly find the version line:

```bash
grep "Server version" /opt/tomcat/logs/catalina.out
```

- If you see multiple entries, the latest one is the current running version.

## Method 3: Using the Tomcat Manager Web Interface

If your Tomcat server has the Manager web application enabled, you can check the version via a browser.

1. Open your web browser.
2. Navigate to the Tomcat Manager URL, usually:

```
http://your-server-ip:8080/manager/html
```

3. Log in with your Tomcat Manager credentials.
4. The Tomcat version is displayed at the top of the page, for example:

```
Apache Tomcat/9.0.73
```

### Important Notes

- The Manager app must be installed and enabled.
- You need valid credentials with manager roles.
- This method is user-friendly and doesn’t require terminal access.

## Method 4: Checking the Manifest File

Tomcat’s version information is stored inside its `catalina.jar` manifest file.

1. Locate the `catalina.jar` file, usually in `/opt/tomcat/lib/`.
2. Use the `unzip` command to extract the manifest:

```bash
unzip -p /opt/tomcat/lib/catalina.jar META-INF/MANIFEST.MF | grep "Implementation-Version"
```

3. The output will show the version, for example:

```
Implementation-Version: 9.0.73
```

This method is useful if you want to check the version without starting Tomcat.

## Method 5: Using Package Manager Commands

If you installed Tomcat via your Linux distribution’s package manager, you can check the version using package commands.

### For Debian/Ubuntu:

```bash
dpkg -l | grep tomcat
```

Or more specifically:

```bash
apt-cache policy tomcat9
```

This shows the installed version of Tomcat packages.

### For Red Hat/CentOS/Fedora:

```bash
rpm -qa | grep tomcat
```

Or:

```bash
yum info tomcat
```

These commands display the installed Tomcat version from the package manager’s perspective.

### Limitations

- This method only works if Tomcat was installed via the package manager.
- It may not reflect the actual running version if you manually upgraded Tomcat.

## Troubleshooting Tips When Checking Tomcat Version

Sometimes, you might face issues finding the version. Here are some tips:

- **No access to Tomcat directories:** Check with your system administrator or use the Manager web interface.
- **Permission denied errors:** Use `sudo` to run commands if you have admin rights.
- **Tomcat not running:** The version script and manifest file methods still work even if Tomcat is stopped.
- **Multiple Tomcat instances:** Make sure you check the correct installation path.

## Summary Table of Methods

| Method                      | Command or Action                               | Notes                          |
|-----------------------------|------------------------------------------------|--------------------------------|
| Version Script              | `./version.sh` in `bin` folder                  | Most direct and detailed       |
| Tomcat Logs                | `grep "Server version" catalina.out`            | Good if script unavailable     |
| Manager Web Interface       | Access `/manager/html` in browser                | Requires enabled Manager app   |
| Manifest File               | `unzip -p catalina.jar META-INF/MANIFEST.MF`    | Works without running Tomcat   |
| Package Manager Commands    | `dpkg -l | grep tomcat` or `rpm -qa | grep tomcat` | Only if installed via package  |

## Conclusion

Now you know several ways to check the Apache Tomcat version on your Linux system. Whether you prefer using the built-in version script, checking logs, or using the web interface, each method is straightforward and effective. Knowing your Tomcat version helps you keep your server secure, compatible, and up to date.

If you manage multiple servers or environments, it’s a good habit to verify the Tomcat version regularly. This ensures your applications run smoothly and you can quickly respond to any security alerts or updates. Next time you need to check your Tomcat version, you’ll have the right tools and commands ready.

---

### FAQs

### How do I find the Tomcat version if I don’t have access to the server terminal?

You can use the Tomcat Manager web interface if it’s enabled. Log in to `http://your-server-ip:8080/manager/html` and the version appears at the top. Otherwise, ask your system admin for access.

### Can I check the Tomcat version if the server is not running?

Yes. You can check the version by inspecting the `catalina.jar` manifest file or running the `version.sh` script even if Tomcat is stopped.

### What if the `version.sh` script does not exist in my Tomcat installation?

Some custom or minimal Tomcat setups might not include it. In that case, check the logs or the manifest file, or use the Manager web interface if available.

### Does the package manager always show the correct Tomcat version?

Not always. If Tomcat was installed manually or upgraded outside the package manager, the package info might be outdated. Use the version script or logs for accuracy.

### How can I check the Tomcat version remotely?

If you have remote access, use SSH to run the version script or check logs. Alternatively, access the Manager web interface remotely if it’s configured and secured properly.
