To install the latest version of NGINX on Ubuntu 22.04, you will need to add the NGINX repository to your system and then install the package using apt-get. Here are the steps you can follow:

Add the NGINX repository to your system:

$ sudo add-apt-repository ppa:nginx/stable


Update the package list using the command below,

sudo apt-get update


Install NGINX using the command below,

$ sudo apt-get install nginx


That's it! NGINX should now be installed on your Ubuntu system. You can check the version of NGINX that you have installed by running the following command:


This will display the version number of NGINX that is currently installed on your system.

$ sudo nginx -v


Next, auto start enable the NGINX service using the systemctl command,

$ sudo systemctl enable nginx.service


Make sure that the NGINX service is running,

$ sudo systemctl status nginx.service