Different ways to shutdown and restart the system
To shutdown:
sudo shutdown -h now
To restart:
sudo reboot
One more command for restart:
sudo shutdown -r now
Another way:
sudo halt
Using init:
sudo init 0
Restart using init:
sudo init 6