I recently got an ubuntu server up and running in my house. Is there a way I can set it to suspend or hybernate or whatever youi call it so long as hard drive stops spinning and uses less power? What I would like is a way to wake it up with a command rather than constantly walk to and from the machine to turn it off and on. Sorry, google chrome browser doesn't seem to be doing any spell checking these days.

Recommended Answers

All 2 Replies

I am no Linux expert, but you could use a few options to shut it down or hibernate: shutdown, reboot, hibernate, sleep, . . . It is pretty easy to specify a particular time for the machine to shut down or go to sleep.

However, waking it up is another matter.
Once the machine is shut down, you can not access it from the console; you have no choice but to walk over to it and turn it back on.
Alternately, if you have set it to re-boot at a certain time, again, you don't have a chance to change that randomly.
Same for sleep. You can put the machine to sleep for a certain amount of time (say, 4 hours), but once that command has been set, I don't know if you can then wake it back up randomly (if you need it back on after 30 minutes).

I have never tried this, but I believe that you can use this Wake-On-LAN feature that most ethernet cards have (unless it is really old, or bad). You can follow these instructions (they are a bit old, but should still work). You can install the package wakeonlan on your remote computer (not server) to do this, I believe you can even turn on a powered-off computer remotely with this program (I think that sending the WOL packet is basically equivalent to hitting the power-button). Of course, this assumes a wired connection between your server and a router. It's a pretty low-level thing (send a UDP packet to a MAC address), so I'm pretty sure you can also wake-up the server from a Windows / Mac computer too.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.