nginx status check ubuntu code example Example 1: how to start nginx in linux sudo systemctl restart nginx Example 2: stop nginx server sudo systemctl stop nginx