Wondering how to check the version of Nodejs, Ansible, Ubuntu, PostgreSQL, Windows, Python and many more?

I believe there should be a standard way to check the version of all the software, but unfortunately, it doesn’t exist. I can guess it’s not possible as not every software is made from the same programming language.

Sometimes, it is a struggling moment to find out the software version installed on your server or PC.

Here I try to consolidate some of the popular ones, hope you will like it!

How to check Nginx version?

Checking Nginx version is easy.

nginx -v

Ex:
root@geekflare:~# nginx -v
nginx version: nginx/1.14.0 (EasyEngine)
root@geekflare:~#

Check Apache HTTP version

Similar to Nginx, you can use -v with httpd file.

[root@instance-1 ~]# /usr/sbin/httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Nov 5 2018 01:47:09
[root@instance-1 ~]#

Check PHP version

Similar to Nginx.

php -v

Ex:
root@geekflare:~# /usr/bin/php -v
PHP 7.2.15-0ubuntu0.18.04.1 (cli) (built: Feb 8 2019 14:54:22) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.15-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
root@geekflare:~#

Check Nodejs version

Check nodejs version with --version syntax like the following.

[root@instance-1 bin]# node –version
v6.16.0
[root@instance-1 bin]#

Check Python version

Similar to Node.js, you can find out python version as below.

[root@instance-1 bin]# python –version
Python 2.7.5
[root@instance-1 bin]#

Check Anaconda version

Using Anaconda platform for Python? Here is how you can find the Anaconda version. Assuming, you are running on UNIX-based OS.

root@geekflarelab:~# conda list anaconda
packages in environment at /root/anaconda3:
#
Name Version Build Channel
anaconda 2018.12 py37_0
anaconda-client 1.7.2 py37_0
anaconda-navigator 1.9.6 py37_0
anaconda-project 0.8.2 py37_0
root@geekflarelab:~#

If you just need to know the anaconda version then add $ at the end.

root@geekflarelab1:~# conda list anaconda$
packages in environment at /root/anaconda3:
#
Name Version Build Channel
anaconda 2018.12 py37_0
root@geekflarelab:~#

Check Angular CLI version

ng with version will show you the installed Angular CLI details.

root@geekflarelab:~# ng version
Angular CLI: 7.3.7
Node: 11.12.0
OS: linux x64
Angular:

Package Version
@angular-devkit/architect 0.13.7
@angular-devkit/core 7.3.7
@angular-devkit/schematics 7.3.7
@schematics/angular 7.3.7
@schematics/update 0.13.7
rxjs 6.3.3
typescript 3.2.4
root@geekflarelab:~#

Check PowerShell version

On PowerShell command prompt, execute the following command to get the version.

PS C:\Windows\system32> $PSVersionTable
Name Value
—- —–
PSVersion 5.1.14393.2828
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
BuildVersion 10.0.14393.2828
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS C:\Windows\system32>

Check MySQL/MariaDB version

Slightly different than PHP. To check the MySQL or MariaDB version, you have to use the following command.

mysql -V

Ex:
root@geekflare:~# mysql -V
mysql Ver 15.1 Distrib 10.1.37-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
root@geekflare:~#

Check PostgreSQL version

To check the PostgreSQL client version

psql -V

And, to check the PostgreSQL server version

pg_config –version

Check Redis Server version

By using -v syntax.

redis-server -v

Check Java version

Execute java with -version and you will have the version details.

[root@instance-1 bin]# java -version
openjdk version “1.8.0_191”
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
[root@instance-1 bin]#

If you are trying to find java version the server and its not in the path, then you may have to give the absolute path to execute java.

Check Ubuntu version

To check the ubuntu version, use the below command.

lsb_release -a

Ex:
chandan@geekflare:~$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
chandan@geekflare:~$

Check CentOS/RHEL version

Wondering on which version of RHEL you are logged in? You can check the version by cat /etc/redhat-release

[root@instance-1 ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@instance-1 ~]

Check Debian version

Debian store the version information in a file which you can cat to see.

chandan@instance-2:~$ cat /etc/debian_version
9.8
chandan@instance-2:~$

Check Linux Kernel version

Sometime you may need to upgrade the kernel or setup a monitoring to ensure all servers are consistent. Whatever it is, you can find the kernel version with uname command as below.

root@geekflarelab:~# uname -r
4.15.0-45-generic
root@geekflarelab:~#

Check MacOS version

If you need to find the MacOS version, then click on Apple icon and >> About This Mac

Check Windows version

I know what you are feeling. C’mon everyone knows how to check this. But trust me, not really.
There are multiple ways to find so let’s look at the two most common procedure.

Using Command
Launch Command Prompt
Type winver and press Enter

This PC
Go to start and search for This PC
Right click on This PC and Properties
It will open the system window where you will find the OS version and other information like type of computer/server, model, processor, RAM, manufacturer, etc.

Check Tomcat version

Apache Tomcat has a dedicated version file which you will find under bin folder. You just need to execute that to find out the Tomcat version.

[root@instance-1 bin]# ./version.sh
Using CATALINA_BASE: /root/apache-tomcat-9.0.16
Using CATALINA_HOME: /root/apache-tomcat-9.0.16
Using CATALINA_TMPDIR: /root/apache-tomcat-9.0.16/temp
Using JRE_HOME: /
Using CLASSPATH: /root/apache-tomcat-9.0.16/bin/bootstrap.jar:/root/apache-tomcat-9.0.16/bin/tomcat-juli.jar
Server version: Apache Tomcat/9.0.16
Server built: Feb 4 2019 16:30:29 UTC
Server number: 9.0.16.0
OS Name: Linux
OS Version: 3.10.0-957.5.1.el7.x86_64
Architecture: amd64
JVM Version: 1.8.0_191-b12
JVM Vendor: Oracle Corporation
[root@instance-1 bin]#

Check WildFly version

You can either check using command or through the management console.
For the command line, you need to run the following.

./standalone.sh –version

And, it will print like this.

20:05:44,496 INFO org.jboss.modules JBoss Modules version 1.9.0.Final
WildFly Full 16.0.0.Final (WildFly Core 8.0.0.Final)

Another way is to log in to the management console and click on version details on the bottom bar.

Check WordPress version

There are multiple ways to find out the installed WP version.

When you log in to WordPress, you will notice the version details on the bottom right.

Check Google Chrome version

Wonder what version of Chrome you are having? Often needed if you are talking to technical support guys or performing some troubleshooting.

Well, it’s not hard to find the chrome version.

Launch Chrome
Click on three dots at top right
Hover to Help and click About Google Chrome to see the version details

Check Internet Explorer (IE) version

You know the major version but do you know the complete version?

Launch IE
Go to Tools icon and click About Internet Explorer
And, it will show you the version information.

Well, now you know!

Check Firefox version

Clicking on About Firefox would reveal the version you are using.

Check apt-get version

As a Linux administrator, you might have come across apt-get (package handling tool). Sometimes you are installing a tool which is not compatible with the current apt-get installed and to find out the version; you can run the below command.

root@geekflarelab:~# apt-get -v
apt 1.6.8 (amd64)
Supported modules:
*Ver: Standard .deb
*Pkg: Debian dpkg interface (Priority 30)
Pkg: Debian APT solver interface (Priority -1000)
Pkg: Debian APT planner interface (Priority -1000)
S.L: ‘deb’ Debian binary tree
S.L: ‘deb-src’ Debian source tree
Idx: Debian Source Index
Idx: Debian Package Index
Idx: Debian Translation Index
Idx: Debian dpkg status file
Idx: Debian deb file
Idx: Debian dsc file
Idx: Debian control file
Idx: EDSP scenario file
Idx: EIPP scenario file
root@geekflarelab:~#

As you can see it shows the version and its supported module.

Check gcc version

Often you are trying to upgrade or install the latest version of the software, and you need to find out the compiler version to see if it is compatible. But finding gcc version is easy!

root@geekflarelab:~# gcc –version
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@geekflarelab:~#

Check Ansible version

--version would show you the installed Ansible version.

root@geekflarelab:~# ansible –version
ansible 2.7.9
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
root@geekflarelab:~#

Check TensorFlow version

It depends on how you have installed. Assuming, you have done it through pip then the following command will show the TensorFlow version details.

root@wordpress-s-1vcpu-3gb-lon1-01:~# pip show tensorflow
Name: tensorflow
Version: 1.13.1
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /root/anaconda3/lib/python3.7/site-packages
Requires: termcolor, absl-py, wheel, protobuf, tensorboard, gast, six, tensorflow-estimator, numpy, keras-preprocessing, grpcio, keras-applications, astor
Required-by:
root@wordpress-s-1vcpu-3gb-lon1-01:~#

Check Brew version

A standard -v syntax would reveal installed brew version.

Chandans-iMac:~ chandan$ brew -v
Homebrew 2.0.2
Homebrew/homebrew-core (git revision 903f; last commit 2019-03-02)
Chandans-iMac:~ chandan$

Check Docker version

Executing docker command with -v will show you the version.

root@geekflare:~# docker -v
Docker version 18.09.3, build 774a1f4
root@geekflare:~#

Conclusion

I hope this helps you to find the software versions.