• Get application security done the right way! Detect, Protect, Monitor, Accelerate, and more…
  • 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

    [email protected]:~# nginx -v
    nginx version: nginx/1.14.0 (EasyEngine)
    [email protected]:~#

    Check Apache HTTP version

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

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

    Check PHP version

    Similar to Nginx.

    php -v

    [email protected]:~# /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
    [email protected]:~#

    Check Nodejs version

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

    [[email protected] bin]# node –version
    [[email protected] bin]#

    Check Python version

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

    [[email protected] bin]# python –version
    Python 2.7.5
    [[email protected] 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.

    [email protected]:~# 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
    [email protected]:~#

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

    [email protected]:~# conda list anaconda$
    packages in environment at /root/anaconda3:
    Name Version Build Channel
    anaconda 2018.12 py37_0
    [email protected]:~#

    Check Angular CLI version

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

    [email protected]:~# ng version
    Angular CLI: 7.3.7
    Node: 11.12.0
    OS: linux x64

    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
    [email protected]:~#

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

    [email protected]:~# mysql -V
    mysql Ver 15.1 Distrib 10.1.37-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
    [email protected]:~#

    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.

    [[email protected] 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)
    [[email protected] 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

    [email protected]:~$ lsb_release -a
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.1 LTS
    Release: 18.04
    Codename: bionic
    [email protected]:~$

    Check CentOS/RHEL version

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

    [[email protected] ~]# cat /etc/redhat-release
    CentOS Linux release 7.6.1810 (Core)
    [[email protected] ~]

    Check Debian version

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

    [email protected]:~$ cat /etc/debian_version
    [email protected]:~$

    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.

    [email protected]:~# uname -r
    [email protected]:~#

    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.

    [[email protected] 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:
    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
    [[email protected] 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.

    [email protected]:~# 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
    [email protected]:~#

    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!

    [email protected]:~# 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
    [email protected]:~#

    Check Ansible version

    --version would show you the installed Ansible version.

    [email protected]:~# 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]
    [email protected]:~#

    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.

    [email protected]:~# 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: [email protected]
    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
    [email protected]:~#

    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.

    [email protected]:~# docker -v
    Docker version 18.09.3, build 774a1f4
    [email protected]:~#


    I hope this helps you to find the software versions.