There are times when the computer is idle, such as coffee breaks, lunch times and so on. Leaving it running is a waste of energy and isn't environmentally friendly. You can save energy and cut your electricity bills by putting it into sleep or hibernation mode. This is a low power or off state, but one that lets you instantly resume and carry on whatever you were doing. It's perfect for long breaks.
Putting the computer into sleep mode is very easy and in Ubuntu (I'm using 12.04), click the computer in the top right corner of the screen and then select Suspend. You don't need to close any windows or applications. Everything is saved, the monitor goes black and the computer reduces all activity and the power consumption goes right down.
When you want to use your computer again, just press the spacebar or move the mouse and the system wakes up. In a few seconds everything is as it was before.
Although you can manually put the computer into sleep mode, it can be done automatically when it is not being used. Run System Settings in Ubuntu and select Power. There's an option called Suspend when inactive for, and then an option to choose 5, 10, 30 or 60 minutes (plus an option not to go into sleep mode). Select the one you want. You don't want the computer to sleep the minute you turn away from the computer, but you don't want it to wait too long. Try 15 or 30 minutes.
Hibernation is slightly different. In this mode, the current computer state is saved to disk, including open windows and applications as with sleep mode, but then the power is completely switched off. It takes a few seconds longer to start up, but that's a small price to pay for the power savings. You have to press the power button to start the computer and then very quicly your programs and windows are restored exactly as they were.
Unfortunately, hibernation is poorly supported and it often doesn't work. Here's how to test the PC to see if it is capable of hibernating. Open a window or two and a program. Then open a Terminal window and type
sudo pm-hibernate. The computer will attempt to go into hibernation and the power should go off. Press the power button to turn it back on and see if the programs and windows are restored. If they are, then you can use hibernation, but if not then don't use it.
If the computer fails to go into hibernation and just hangs, hold down the power button until it turns off. Then turn it back on. If the wireless internet connection is lost when resuming from sleep or hibernation, click the icon in the menu bar at the top and turn it off. Wait a second and turn it back on.