Jump to content

Admin

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Danomaish (talk | contribs) at 22:23, 3 April 2025. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

import subprocess

def restart_server():

   subprocess.run(["sudo", "reboot"])
  1. Call the function to restart the system

restart_server()

See also