If you want to turn of your computer form the command-line, doing a simple sudo sh -c 'poweroff' is nolonger really an option. The problem with this command is twofold: it will kill everything and you need root privileges for this.
If you want to turn of your computer without root privileges, you can do so using the privileges that gdm has (the login manager). If you are running a GNOME desktop you should use gnome-power-cmd.sh shutdown. You can give other commands to gnome-power-cmd.sh, running it without commands will tell you so.
If you are running KDE, you might want to take a look at kdeinit-shutdown, but I'm not familiar with that.