Using Wake on LAN on Linux

Most PCs support Wake On LAN (WOL). In fact, the built-in ethernet adapter supports this feature. It allows to put a machine in sleep or hibernate mode and to wake it up remotely from the same network. After the machine wakes up, logging in by using SSH is possible.

Follow these steps on the machine you want to support WOL:

  1. ifconfig displays all network devices

  2. ethtool [network device] displays the qualities and settings of a network device. Here you can see if your ehternet adapter supports WOL.

  3. ethtool -s [network device] wol g: this command turns on WOL in case it is supported, but not activated yet

Finally use this command from another PC to wake up the machine: ether-wake -i [network device] [MAC address]

The ether-wake commands works among others on the RHEL distribution. On some other Linux distributions, the command can be slightly different. Alternative commands are wol or wakeonlan.