Viewing your server's software versions

 

Overview

This article lists several commands you can use to check the version of different software at DreamHost. All commands listed in this article should be run on a DreamHost server after logging into it via SSH.

The following topics are covered in this article:

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 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: 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 server's Linux Kernel version

The uname command

Run the uname command with the -a flag to view the following:

  • Kernel name
  • Server name
  • Kernel release
  • Kernel version
  • Server hardware architecture
  • Operating system
[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

Nginx is only available on VPS and Dedicated Servers.

This command only shows the version of Nginx installed on a VPS or Dedicated Server. It does not confirm if Nginx is running. View the following article for instructions on how to set your VPS to run Nginx instead of Apache.

Run the following to view the version of Nginx installed.

[server]$ /usr/sbin/nginx -v

Check if Nginx is running on a VPS or Dedicated Server

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

You can view the versions of the following software after logging into your server via SSH and running the corresponding command.

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 and run the following 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


Run the sqlite command to enter its Shell. Type .quit to leave the sqlite Shell.

[server]$ sqlite
SQLite version 2.8.17
Enter ".help" for instructions
sqlite> .quit
sqlite3
[server]$ sqlite3 --version

Package versions on all servers

Software Jammy Focal Bionic
curl 7.81.0 7.68.0 7.58.0
gcc 11.3.0 9.4.0 7.5.0
git 2.34.1 2.25.1 2.17.1
Java 1.8.0 1.8.0 1.8.0
Node.js 12.22.9 10.19.0 Not installed
OpenSSL 3.0.2 1.1.1f 1.1.1
Perl 5.34.0 5.30.0 5.26.1
PHP PHP versions
Python 2 2.7.18 2.7.18 2.7.17
Python 3 3.10.6 3.8.10 3.6.9
Ruby 3.0.2 2.5.1
SSH 8.9p1 8.2p1 7.6p1
sqlite 2.8.17 2.8.17 2.8.17
sqlite3 3.37.2 3.31.1 3.22.0

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?