sudo apt install -y etherwake ethtool
sudo apt install -y ethtool
then use it
#ethtool <your-interfacename>
ethtool eth0
look for the WOL option to see if it’s available
#sudo etherwake -i <your interface> <other MAC address>
sudo etherwake -i eno1 90:B1:1C:77:31:0F
[Unit]
Description=Enable Wake-up on LAN
[Service]
Type=oneshot
ExecStart=/usr/sbin/ethtool -s <your-interface> wol g
[Install]
WantedBy=basic.target
sudo chmod 644 /etc/systemd/system/wol.service
sudo systemctl enable wol.service
sudo systemctl start wol.service
sudo systemctl status wol.service
list connections
nmcli connection show
look for the ethernet connection
nmcli connection show id 'Profile 1' | grep -i wake
should look like this:
802-3-ethernet.wake-on-lan: default
802-3-ethernet.wake-on-lan-password: --
sudo nmcli connection modify 'Profile 1' 802-3-ethernet.wake-on-lan magic