Wake on LAN in Ubuntu
Enable Wake on LAN flag for interface enp1s0 on boot. Prerequisite: sudo apt-get install ethtool
/etc/systemd/system/wol.service
:
[Unit]
Description=Configure Wake-up on LAN
[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s enp1s0 wol g
[Install]
WantedBy=basic.target
systemctl daemon-reload && systemctl enable wol.service && systemctl start wol.service