linux command to restart nginx code example Example 1: restart nginx sudo systemctl restart nginx Example 2: ubuntn nginx restart sudo service nginx restart