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:

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 18.04.4 LTS
Release:        18.04
Codename:       bionic

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 18.04.4 LTS \n \l

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
Linux gervais 4.14.117-grsec-grsec+ #1 SMP Fri May 10 17:15:47 PDT 2019 x86_64 GNU/Linux

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
Linux version 3.14.52-vs2.3.6.15-1 (root@ksplice-build2.us.oracle.com) 
(gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Wed Nov 2 10:45:38 UTC 2016

Apache version and status

Run the following to view the version of Apache installed.

[server]$ /usr/sbin/apache2 -v
Server version: Apache/2.4.29 (Ubuntu)
Server built:   2020-08-12T21:33:25

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 ?        SNs    1:06 apache2
24668 ?        SN     0:00 apache2
24769 ?        SNl    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
nginx version: nginx/1.14.1

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

Django


You must install Django into a virtualenv and activate it before running this command.

(venv) [server]$ python -c "import django; print(django.get_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
Passenger
[server]$ dpkg -l | grep passenger
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 Focal Bionic Buster Stretch
curl 7.68.0 7.58.0 7.64.0 7.52.1
gcc 9.4.0 7.5.0 8.3.0 6.3.0
git 2.25.1 2.17.1 2.20.1 2.20.1
Java 1.8.0 1.8.0 11.0.12 1.8.0
Node.js 10.19.0 Not installed 12.22.1 12.14.0
OpenSSL 1.1.1f 1.1.1 1.1.1d 1.1.0l
Passenger 5.0.30 5.0.30 5.0.30 5.0.30
Perl 5.30.0 5.26.1 5.28.1 5.24.1
PHP PHP versions
Python 2 Not installed 2.7.17 2.17.16 2.7.13
Python 3 3.8.10 3.6.9 3.7.3 3.5.3
Ruby 2.7.0 2.5.1 2.5.5 2.7.0
SSH 8.2p1 7.6p1 7.9p1 7.4p1
sqlite 2.8.17 2.8.17 2.8.17 N/A
sqlite3 3.31.1 3.22.0 3.27.2 3.27.2

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?