/notebook/wake-on-lan

Setting up Wake on Lan


Wake on Lan

On the waking computer

sudo apt install -y etherwake ethtool

On the computer you want to wake

sudo apt install -y ethtool

then use it

#ethtool <your-interfacename>
ethtool eth0

look for the WOL option to see if it's available

To wake

#sudo etherwake -i <your interface> <other MAC address>
sudo etherwake -i eno1 90:B1:1C:77:31:0F

Create a service

```cat << EOF | sudo tee /etc/systemd/system/wol.service [Unit] Description=Enable Wake-up on LAN

[Service] Type=oneshot ExecStart=/usr/sbin/ethtool -s wol g

[Install] WantedBy=basic.target

```bash
sudo chmod 644 /etc/systemd/system/wol.service
sudo systemctl enable wol.service
sudo systemctl start wol.service
sudo systemctl status wol.service 

Disable Network Manager

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

External Resources

About

I am an engineer and educator, having spent ten years as a professor. My goal is to help you build your knowledge of design and technology, get your hardware working, and propel your startup or small business. Get in touch!