Shutdown computer

To restart the computer immediately:

sudo shutdown -r -t 0

To shut down the computer immediately:

sudo shutdown -t 0