Skip to content

Instantly share code, notes, and snippets.

@chrisyco
chrisyco / power.sh
Created May 24, 2011 03:38
Suspend, hibernate, restart or shutdown the computer without sudo!
#!/bin/sh
# Suspend, hibernate, restart or shutdown the computer without sudo!
# by Chris Wong
# Released to the public domain.
NAME=$0
usage() {
echo "Usage: $NAME suspend|hibernate|restart|shutdown"