# Enable Wake On LAN on Proxmox/Debian

Wake on LAN is very useful functionality if your hardware supports it. Here is a good tutorial on the steps required to enable WOL on a device. This typically needs to be enabled in the BIOS first and the steps below will enable it in Linux https://www.lifewire.com/wake-on-lan-4149800

1. After enabling WOL in the BIOS, boot into Linux and login
2. Run the following commands in a terminal window
   # install ethtool
   sudo apt install ethtool -y
   # list network devices
   ip addr
3. Look for the device that has a local IP address (192.168 or 10.10)
4. Note the device name and the MAC address for use later when sending the magic packet
5. Continue with the following commands to check if the device supports WOL
   # replace eno1 with the device name to test
   sudo ethtool eno1
6. Find the Supports Wake-on line
7. If it contains a g it supports WOL, continue with the following commands
   # enable wol on the device
   sudo ethtool -s eno1 wol g
   # edit the network interfaces configuration
   sudo nano /etc/network/interfaces
8. Paste the following below the iface line for the network device

   ethernet-wol g

9. Press CTRL+O, Enter, CTRL+X to write the changes
10. Shutdown the device
11. Test to see if WOL is working by sending a magic packet
12. If everything is setup correctly the device should awaken from it's slumber and boot up
13. Log back into the device and run the following command to verify the Wake-on value has updated to g on boot
    # replace eno1 with the device name to test
    sudo ethtool eno1

NOTE: If the WOL flag doesn't stick with the configuration above, replace the "ethernet-wol g" value in /etc/network/interfaces with "post-up /usr/sbin/ethtool -s eno1 wol g", replacing eno1 with the name of the interface.