Overview
You can check the installed version of your server's operating system, kernel, Apache or Nginx web server, and other software using SSH commands. This article covers:
- Security, Vulnerabilities, Patches, Updates
- Operating system
- Linux kernel
- Apache
- Nginx
- Various software
- Package versions
Prerequisites
All commands in this article require SSH. Before proceeding, make sure you have configured a Shell user and can log into your server via SSH.
Security, Vulnerabilities, Patches, Updates
DreamHost only uses 'Long Term Support' (LTS) versions of Ubuntu. This means that while the version does not change, your server is always protected since Ubuntu is continually adding security patches to mitigate any vulnerabilities that are discovered. View the following page for more information about Ubuntu releases and their lifecycle:
How do I view my server's operating system version?
The following two commands display the server's operating system version.
The lsb_release command
Run the LSB (Linux Standard Base) command with the -a flag to view your server's operating system version.
[server]$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammyHow do I view the /etc/issue file?
Run the following command to view the contents of the /etc/issue file, which displays your server's operating system version.
[server]$ cat /etc/issue
Ubuntu 22.04.2 LTSHow do I view my server's Linux kernel version?
The uname command
Run the uname command with the -a flag to view all kernel information.
[server]$ uname -aHow do I view the /proc/version file?
The /proc/version file displays the kernel version as well as information about the GCC compiler used to build the kernel.
[server]$ cat /proc/versionApache version and status
Run the following to view the version of Apache installed.
[server]$ /usr/sbin/apache2 -vHow do I check if Apache is running on a Managed VPS or Dedicated Server?
Managed VPS and Dedicated Servers can run Apache or Nginx. Run the following command to check if Apache is running.
- If Apache is running you will see the following output.
- If there is no output, Apache is not running. Run the Nginx command below to confirm it is running instead.
[server]$ ps -acx | grep apache
17513 ? Ss 1:06 apache2
24668 ? S 0:00 apache2
24769 ? Sl 0:16 apache2Nginx version and status (Managed VPS and Dedicated Servers)
How do I view the version of Nginx installed?
Run the following to view the version of Nginx installed.
Nginx is only available on Managed VPS and Dedicated Servers. This command only shows the version of Nginx installed. It does not confirm if Nginx is running. View the Change your web server to Nginx article for instructions on running Nginx instead of Apache.
[server]$ /usr/sbin/nginx -vHow do I check if Nginx is running?
Run the following command to check if Nginx is running.
- If Nginx is running, you will see the following output.
- If there is no output, Nginx is not running. Run the Apache command above to confirm it is running instead.
[server]$ ps -acx | grep nginx
12708 ? Ss 0:02 nginx
26797 ? S 0:00 nginx
26798 ? S 0:00 nginxSoftware versions
Run the following commands to view the versions of the following software.
| Software | Command |
|---|---|
| curl | |
| gcc | |
| git | |
| Java | |
| MySQL |
Log into your MySQL server via SSH to run this command. |
| Node.js | |
| OpenSSL | |
| Perl | |
| PHP | |
| Python | |
| Ruby | |
| SSH | |
|
sqlite
|
|
| sqlite3 | |
Package versions on all servers
| Software | Focal | Jammy | Noble |
|---|---|---|---|
| curl | 7.68.0 | 7.81.0 | 8.5.0 |
| gcc | 9.4.0 | 11.3.0 | 13.2 |
| git | 2.25.1 | 2.34.1 | 1:2.43.0 |
| Java | 1.8.0 | 1.8.0 | 8u402 |
| Node.js | 10.19.0 | 12.22.9 | 18.19.1 |
| OpenSSL | 1.1.1f | 3.0.2 | 3.0.13 |
| Perl | 5.30.0 | 5.34.0 | 5.38.2 |
| PHP | PHP versions | ||
| Python 2 | 2.7.18 | 2.7.18 | N/A |
| Python 3 | 3.8.10 | 3.10.6 | 3.12.3 |
| Ruby | 2.5.1 | 3.0.2 | 3.2 |
| SSH | 8.2p1 | 8.9p1 | 9.6p1 |
| sqlite | 2.8.17 | 2.8.17 | N/A |
| sqlite3 | 3.31.1 | 3.37.2 | 3.45.1 |