↑ ↓ select, Enter open, Esc close

Show the nginx version and compiled-in modules

user@server
nginx -V 2>&1 | tr " " "\n" | grep -E "version|_module"

nginx -V writes the version and build options to stderr, hence the 2>&1 redirect. The options are split into one per line and filtered down to the version and all --with-..._module entries. Dynamically loaded modules do not appear here, they are listed as load_module in the configuration.

Note: If nginx is not in the user’s path, use /usr/sbin/nginx -V.

Also searched as

  • check nginx version
  • does nginx support http2
  • list nginx modules
  • is brotli enabled in nginx

Related one-liners

All in nginx

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.