How To Install Nginx On Debian, Ubuntu, Alpine, Arch, Kali, Fedora, Raspbian And MacOS?
Maintainer: Debian Nginx Maintainers
Email: [email protected] .
Website: https://nginx.net
Section: httpd
Install nginx
-
Debian
apt-get install nginx-extrasClick to copy -
Ubuntu
apt-get install nginx-extrasClick to copy -
Alpine OS
apk add nginxClick to copy -
Arch Linux
pacman -S nginxClick to copy -
Kali Linux
apt-get install nginx-extrasClick to copy -
Fedora
dnf install nginx-extrasClick to copy -
Raspbian
apt-get install nginx-extrasClick to copy -
macOS
brew install nginxClick to copy
Nginx web server. Homepage: .
How to use nginx?
Below are few example commands for nginx that you can use in the terminal.
Start server with the default config file:nginxClick to copyStart server with a custom config file:nginx -c config_fileClick to copyStart server with a prefix for all relative paths in the config file:nginx -c config_file -p prefix/for/relative/pathsClick to copyTest the configuration without affecting the running server:nginx -tClick to copyReload the configuration by sending a signal with no downtime:nginx -s reloadClick to copy
Installing nginx command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, Fedora, Raspbian and macOS operating systems. Once you run the command it will install the latest version of nginx 2026 package in your OS.




