Its easy to shutdown down Ubuntu from the commandline (given the correct permissions). Shutdown with
shutdown which gives you 60 seconds to reverse that decision to shutdown by cancelling with
shutdown -c. You can also
reboot which takes effect right away.
shutdown # shutdown shutdown -c # cancel that shutdown. reboot # reboot the computer now