Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

woodsey

macrumors regular
Original poster
Nov 15, 2001
154
0
I have a PowerMac in my living room which I use to share its dial-up internet connection with the iMac in my bedroom, over ethernet.

I often check email etc. in bedroom just before bed, and am too lazy to return to the living room to sleep the PowerMac.

Is it possible to sleep or shutdown the PowerMac remotely using ssh over the terminal, or any other way?
 

Westside guy

macrumors 603
Oct 15, 2003
6,349
4,165
The soggy side of the Pacific NW
I bet you can do this with an Applescript. If so you could invoke that from the command line.

I keep meaning to learn it but I keep putting it off... :D

Edit: Here ya go (I tried it, and it works):

Code:
osascript -e 'tell application "Finder" to sleep'

Now repeat after me: Google is my friend, Google is my friend, Google ... :D
 

cluthz

macrumors 68040
Jun 15, 2004
3,118
4
Norway
You can also use this command:
Code:
sudo shutdown -h

For more info run this in the terminal:
Code:
man shutdown
 

Westside guy

macrumors 603
Oct 15, 2003
6,349
4,165
The soggy side of the Pacific NW
Just a note - "shutdown" is not the same as "sleep". It completely powers off your computer. Not a problem as long as that's what you're after.

For most folks there's not much reason to completely shut off your computer though (in my opinion anyway).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.