For those who also want to know how to install a specific version of Nginx on Ubuntu Linux, the steps below will also show them how to do that. The steps will also include options to find out what modules are loaded with Nginx on Ubuntu Linux as well. For those who don’t know what Nginx is, here’s an overview: Nginx is one of the most popular open-source web servers in the world. Chances are many of the websites you visit today mostly likely are running the Nginx HTTP server. And if you’re thinking of running a website, you find yourself using an Nginx web server as well. To get started with finding out what version of Nginx you’re running, or installing a specific Nginx version on Ubuntu Linux, continue below.

How to find out what version of Nginx you are running in Ubuntu Linux

Installing Nginx on Ubuntu Linux is easy. Simply run the apt-get install nginx commands to get it installed. On the Ubuntu Linux command console, run the commands below to check the Nginx version. Once you run the command above, it should output similar lines as below: As you can see, version number 1.18.0 is the latest version currently available in the Ubuntu repository, however, it doesn’t mean that it is the latest version of Nginx available to be installed. You may also be able to find more info on the Nginx version installed by running the commands below: When you run the commands above, it should list similar lines as below: If you have curl installed, you may also be able to tell what version of Nginx running on Ubuntu Linux by using the commands below: When running the commands above, it should list something similar to the lines below:

How to find out what Nginx modules are currently loaded in Ubuntu Linux

Now that you know how to find out what version of Nginx is installed on your system, the commands below show you how to list all the modules that are currently loaded with Nginx. Once you run the commands above, it should output similar lines as below. Depending on your environment, the list above may be long or short.

How to install a specific version of Nginx on Ubuntu Linux

By default, the Ubuntu repository contains the latest stable version of Nginx. When you install Nginx from the Ubuntu repository, it will only install that specific version available at that time. If you need to install a specific version not available in Ubuntu Linux, you may have to add a third-party repository to your system. Run the commands below to add a repository to Ubuntu Linux that will allow you to install specific versions. First, install the necessary commands below: Next, run the commands below to add the repository. After that, you can search for and install a specific version of Nginx. Install a specific version by running the command format below: Replace with the version number available for Ubuntu. Example: Now the new version should reflect as shown below: That should do it! Conclusion: This post showed you how to check and install specific Ngnix versions on Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.