In Ubuntu,there are a couple of ways  to shut down the system.This tutorial lists all manner of them(test on Ubuntu 9.04 Gnome).

1.As all we know,ubuntu desktop version provides shutdown,restart options in top right.


2.Use “shutdown” command to shutdown with a little time delayed.

sudo shutdown -h 3600

When you run this command in terminal(Applications/Accessories/Terminal),system will shutdown 3600 seconds later.If want to restart,use  “-r” instead of “-h”.
3.Quick shutdown with “poweroff”,”halt” command.

sudo poweroff
sudo halt

4.Ultimate shutdown with “init”,”telinit”

sudo init 0

This will stop the system “top-level” process,so user processes and other processes will stop,system down.
“sudo init 1″ :single user mode. Equivalent to Windows safe mode.
“sudo init 2″ :multiple user mode.(without NFS)
“sudo init 3″ : global multiple user mode(include NFS).
“sudo init 6″ : restart.
for more use:

man init

5.Remote shutdown using SSH.
Log into remote system and use previous methods.Or use this command:

ssh –l user remotehost sudo shutdown –h now