sudo crontab -e
@reboot /sbin/ethtool -s enp1s0f0 wol g
sudo nano /etc/network/interfaces
Add the following 2 lines there:
post-up /sbin/ethtool -s $IFACE wol g
post-down /sbin/ethtool -s $IFACE wol g
sudo nano /etc/network/interfaces
Add the following 2 lines there:
post-up /sbin/ethtool -s $IFACE wol g
post-down /sbin/ethtool -s $IFACE wol g
Run the following to enable it for the first time (not really needed but might as well), change enp4s0 for the name of your device (you can run ifconfig to find out):
sudo ethtool -s enp4s0 wol g
You can now run the following to check the status (you're looking for "Wake-on: g".
sudo ethtool enp4s0