How to Check Software or Packages Version in Linux

When working with Linux environment, it’s important to know the versions of various software and packages installed on your system. Knowing the software version helps you stay informed about updates, security patches, and compatibility requirements.

In this short guide, we will explore different methods to check the version of commonly used software and packages in Linux.

How to Check Postfix MTA Version:

To check the version of Postfix, the popular Mail Transfer Agent (MTA) in Linux, use the following command:

postfix --version

This command will display the version of Postfix installed on your system.

# postfix --version
mail_version = 2.10.1
milter_macro_v = $mail_name $mail_version

How to Check PHP Version and ionCube Loader:

To check the version of PHP along with the ionCube loader, if installed, execute the following command:

php -v

This command will show you the PHP version and other relevant information, including the presence of ionCube loader.

# php -v
PHP 5.4.16 (cli) (built: Oct 31 2014 12:59:36)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd.

How to Check PHP FastCGI Version:

To determine the version of PHP FastCGI, use the command:

php-fpm -v

Running this command will provide you with the PHP FastCGI version information.

# php-fpm -v
PHP 5.4.37 (fpm-fcgi) (built: Jan 21 2015 11:13:07)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd.

How to Check Nginx Version:

To check the version of Nginx, a popular web server, use the command:

nginx -v

Executing this command will display the Nginx version installed on your system.

# nginx -v
nginx version: nginx/1.8.0

How to Check Nginx Version and Configuration Options:

To obtain both the version and the configuration options of Nginx, run the following command:

nginx -V

This command will provide you with detailed information about the Nginx version and the configuration options it was built with.

# nginx -V
nginx version: nginx/1.8.0
built by gcc 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'

How to Check Apache Version:

To check the version of Apache HTTP Server, one of the most widely used web servers, use the command:

httpd -v

This command will display the Apache version installed on your system.

# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Mar 12 2015 15:07:19

How to Check Apache Version and Configuration Options:

To retrieve the Apache version and the configuration options it was built with, run the following command:

httpd -V

This command will provide detailed information about the Apache version and its configuration options.

# httpd -V
Server version: Apache/2.4.6 (CentOS)
Server built:   Mar 12 2015 15:07:19
Server's Module Magic Number: 20120211:24
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

How to Check 389 Directory Version:

To check the version of 389 Directory Server, an enterprise-class LDAP server, execute the following command:

dsconf -v

Running this command will display the version of 389 Directory Server installed on your system.

# /usr/sbin/ns-slapd -v
389 Project
389-Directory/1.3.3.1 B2015.118.1941
# rpm -qa | grep 389
389-adminutil-devel-1.1.21-2.el7.x86_64
389-ds-base-libs-1.3.3.1-16.el7_1.x86_64
389-admin-1.1.38-1.el7.x86_64
389-ds-base-devel-1.3.3.1-16.el7_1.x86_64
389-adminutil-1.1.21-2.el7.x86_64
389-ds-base-1.3.3.1-16.el7_1.x86_64

How to Check Installed Packages:

To view a list of installed packages on your Linux system, you can use package management commands such as dpkg (Debian/Ubuntu) or yum (CentOS/RHEL). For example:

dpkg --list

or

yum list installed

These commands will show you the installed packages along with their versions.

See also  How to Find Files in Linux

How to Check Bind Named Server Version:

To check the version of the BIND named server, which is a widely used DNS server, use the following command:

named -v

This command will display the version of BIND named server installed on your system.

# /usr/sbin/named -v
BIND 9.9.4-RedHat-9.9.4-18.el7_1.1 (Extended Support Version)

How to Check Zimbra Collaboration Suites Version:

To determine the version of Zimbra Collaboration Suites, an email and collaboration platform, execute the following command:

zmcontrol -v

Running this command will provide you with the version information of Zimbra installed on your system.

# su - zimbra
$ zmcontrol -v
Release 8.5.0_GA_3042.RHEL6_64_20140828192005 RHEL6_64 FOSS edition.

How to Check vsftpd Server Version:

To check the version of the vsftpd server, a secure and efficient FTP server, use the command:

vsftpd -v

Executing this command will display the version of vsftpd installed on your system.

# /usr/sbin/vsftpd -v
vsftpd: version 3.0.2

How to Check OpenSSH Client Version:

To check the version of the OpenSSH client, which is used for secure remote login, run the following command:

ssh -V

This command will display the version of the OpenSSH client installed on your system.

# /usr/bin/ssh -V
OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013

How to Check MySQL Client Version:

To determine the version of the MySQL client, a widely used relational database management system, use the command:

mysql -V

This command will display the version of the MySQL client installed on your system.

# /usr/bin/mysql -V
/usr/bin/mysql  Ver 15.1 Distrib 5.5.41-MariaDB, for Linux (x86_64) using readline 5.1

How to Check Varnishd Version:

To check the version of Varnish Cache, a popular HTTP accelerator, execute the following command:

varnishd -V

Running this command will display the version of Varnish Cache installed on your system.

# /usr/sbin/varnishd -V
varnishd (varnish-4.0.3 revision b8c4a34)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2014 Varnish Software AS

How to Check Logical Volume Manager (LVM) Version:

To check the version of the Logical Volume Manager (LVM), a tool for managing logical volumes in Linux, use the following command:

lvm version

This command will display the version of LVM installed on your system.

# lvm version
  LVM version:     2.02.115(2)-RHEL7 (2015-01-28)
  Library version: 1.02.93-RHEL7 (2015-01-28)
  Driver version:  4.29.0

Conclusion:

In this guide, we have explored various methods to check the versions of software and packages commonly used in Linux. By using the provided commands, you can quickly determine the versions of software such as Postfix, PHP, Nginx, Apache, 389 Directory, Bind named server, Zimbra, vsftpd, OpenSSH, MySQL, Varnishd, and Logical Volume Manager on your Linux system. Keeping track of software versions is essential for maintenance, security, and compatibility purposes.

See also  How to Enable mod_rewrite Apache module on Ubuntu

If you have any further questions or suggestions for improvement, please feel free to comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *