Does wake-on LAN/WOL depend on hardware or the operating system? Or both? How does one send a command to wake up a machine if it is supported (say a Fedora server)?
Hardware, and the associated firmware that runs on that hardware. It is OS independent.
There are a plethora of WoL utilities to send a "wake up" packet (sometimes called a Magic Packet). Try the port/package management system in your OS (or Google it). It's usually as easy as
wol [MAC Address]
Wake On Lan involves sending a "magic packet" which contains the MAC address of the destination computer. There's a lot of detail here:
The best way to send a WOL request from one Linux box to another is ether-wake. If you're looking for it in Fedora, install the net-tools package:
$ yum whatprovides */ether-wake net-tools-1.60-102.fc13.x86_64 : Basic networking tools Repo : fedora Matched from: Filename : /sbin/ether-wake
The syntax is pretty darned easy:
00:11:22:33:44:55 with the MAC address of the machine you want to wake.
Both, the hardware is a fundimental requirement but the control of WoL is passed to the os on boot and the os could change if it works or not.
The following guide goes step by step on configuration and gives good understanding of WOL. Please read at http://www.thegeekstuff.com/2008/11/wol-wakeonlan-guide-remotely-turn-on-servers-without-physical-access/