How to check Nginx version

We can type the command nginx -v (lowercase v) in Linux, macOS, and Windows to show the Nginx version currently installed on our system.

nginx version

1. Check Nginx version

The Nginx with a lowercase v option, the nginx -V show the version and then exits. In the below output, Nginx version 1.21.0 is currently installed.

Terminal

$ nginx -v

nginx version: nginx/1.21.0

2. Check Nginx configuration

The Nginx with an uppercase V option, the nginx -V show version and configuration options then exit.

Terminal

$ nginx -V

nginx version: nginx/1.21.0
built by clang 12.0.5 (clang-1205.0.22.9)
built with OpenSSL 1.1.1k  25 Mar 2021 (running with OpenSSL 1.1.1u  30 May 2023)
TLS SNI support enabled

configure arguments: --prefix=/usr/local/Cellar/nginx/1.21.0
--sbin-path=/usr/local/Cellar/nginx/1.21.0/bin/nginx
......

References

mkyong

Founder of Mkyong.com, passionate Java and open-source technologies. If you enjoy my tutorials, consider making a donation to these charities.

0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments