How To Find Out Nginx Version

How do I print Nginx web server version using command line option under Unix like operating systems? How do I check nginx version?

This quick tutorial explains how to check nginx version using the command line option running on Linux or Unix-like operating systems.

How To Find Out Nginx Version

You can pass the -v or -V option to display nginx web server version. The syntax is:
nginx -v
Sample outputs:

nginx version: nginx/1.2.3

Check Nginx version Command

The -V option shows nginx version, compiler version and configure parameters.
nginx -V
Sample outputs:

nginx version: nginx/1.2.3
built by gcc 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) 
TLS SNI support enabled
configure arguments: --without-http_autoindex_module --without-http_userid_module --without-http_auth_basic_module --without-http_fastcgi_module --without-http_empty_gif_module --with-poll_module --with-http_stub_status_module --with-http_ssl_module --with-ipv6 --with-http_geoip_module

What to do if I get nginx command not found error?

Check for nginx path using the [nixmd name=”which”]/whereis command, run:
whereis nginx
which nginx

Look for nginx binary on your Linux or Unix system using PATH:
echo "$PATH"
Use the ps command to grab path for nginx:
ps aux | grep nginx
Once found use full path:
/usr/sbin/nginx -v
sudo /usr/sbin/nginx -v
sudo /usr/local/sbin/nginx -v

Dealing with nginx command not found

Find nginx version using the apt-cache command

Are you using a Debian or Ubuntu Linux server? If so, to check the nginx version, you can use the following command too:
$ apt-cache policy nginx

Find nginx version running on Ubuntu Linux


This page explains how to find out the version of nginx installed on your systems. The binary has following options:

Option Description
-?,-h this help
-v display nginx version and exit
-V show nginx version and configure options then exit
-t test configuration and exit
-T test configuration, dump it and exit
-q suppress non-error messages during configuration testing
-s signal send signal to a master process: stop, quit, reopen, reload
-p prefix set prefix path (default: /usr/share/nginx/)
-c filename set configuration file (default: /etc/nginx/nginx.conf)
-g directives set global directives out of configuration file

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Leave a Reply

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

Previous Post

How to Make Website WCAG Compliant?

Next Post

Link download Kali Linux 2020.1 (ISO + Torrent)

Related Posts