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

    [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 
    

    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