Basic Commands in Nginx
From the Nginx cheat sheet ยท Installation & Basic Commands ยท verified Jul 2026
Basic Commands
Essential Nginx management commands
bash
# Start/Stop/Restart
sudo systemctl start nginx
sudo systemctl stop nginx
sudo systemctl restart nginx
sudo systemctl reload nginx
# Test configuration
sudo nginx -t
# Show current config
sudo nginx -Tโ
Always test config before reload with nginx -t
๐ Reload applies changes without dropping connections
๐ Config files in /etc/nginx/ directory
๐ Logs in /var/log/nginx/ by default