How to Shut down or Reboot a Ubuntu/Linux machine from a Terminal?

Use the below commands to shut down a Ubuntu/Linux machine from the terminal.

sudo poweroff

Use the below commands to restart a Ubuntu/Linux machine from the terminal.

sudo restart

Related Links