how to restart nginx service in linux code example Example 1: restart nginx sudo systemctl restart nginx Example 2: restart nginx sudo systemctl reload nginx