Overview
This article explains how to view the versions of different types of software on your server. The following topics are covered:
- 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:
Viewing the 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: jammy
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 LTS
Viewing the Linux Kernel version
The uname command
Run the uname command with the -a flag to view all kernel information.
[server]$ uname -a
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/version
Apache version and status
Run the following to view the version of Apache installed.
[server]$ /usr/sbin/apache2 -v
Check if Apache is running on a VPS or Dedicated Server
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 apache2
Nginx version and status (VPS and Dedicated Servers)
View the version of Nginx installed
Run the following to view the version of Nginx installed.
Nginx is only available on 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 -v
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 nginx
Software versions
Run the following commands to view the versions of the following software.
Software | Command |
---|---|
curl |
[server]$ curl --version |
gcc |
[server]$ gcc --version |
git |
[server]$ git --version |
Java |
[server]$ java -version |
MySQL |
Log into your MySQL server via SSH to run this command. [server]$ select version(); |
Node.js |
[server]$ node -v |
OpenSSL |
[server]$ openssl version |
Perl |
[server]$ perl -v |
PHP |
[server]$ php -v |
Python |
[server]$ python -V |
Ruby |
[server]$ ruby -v |
SSH |
[server]$ ssh -V |
sqlite
|
[server]$ sqlite SQLite version 2.8.17 Enter ".help" for instructions sqlite> .quit |
sqlite3 |
[server]$ sqlite3 --version |
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 |