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 private server 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

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?