===== Enable Wake-on-LAN persistent ===== This guide was tested on Ubuntu 22 and Debian 11/12. ==== Check current setting and enable manually ==== Firstly find out the interface on which WoL should be enabled. Therefore use ''ifconfig'' that is shipped with the ''net-tools''-package on Debian/Ubuntu: ifconfig Your output may look like this: enp1s0: flags=4163 mtu 1500 inet 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::ed26:e33:5d38:2468 prefixlen 64 scopeid 0x20 ether xx:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet) RX packets 138808 bytes 178312866 (178.3 MB) RX errors 0 dropped 3324 overruns 0 frame 0 TX packets 70435 bytes 59140948 (59.1 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 [...] wlp2s0: flags=4099 mtu 1500 ether xx:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Then check the current Wake-on-LAN-state with ''ethtool''. (Package to install has the same name): sudo apt install ethtool ethtool Replace '''' for examle with ''enp1s0'', if this is the ID of your interface. The output may now look like this: ++++ Show/Hide | Settings for enp1s0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Auto-negotiation: on master-slave cfg: preferred slave master-slave status: slave Port: Twisted Pair PHYAD: 0 Transceiver: external MDI-X: Unknown Supports Wake-on: pumbg Wake-on: d Link detected: yes ++++ Important are the following lines: [...] Supports Wake-on: pumbg Wake-on: d [...] If the line ''Supports Wake-on:'' contains **''g''**, then Wake-on-LAN ist supported. If the line ''Wake-on:'' already says ''Wake-on: g'', then WoL is already enabled, if not, you can enable it with: sudo ethtool -s wol g ==== Enable automatically at boot ==== If not enabled in BIOS WoL has to be enabled before shutting down. This can be done by a system service: Firstly create the service file: sudo nano /etc/systemd/system/wol-enable.service And add this content: [Unit] Description=Configure Wake-up on LAN After=network-online.target [Service] Type=oneshot ExecStart=/sbin/ethtool -s wol g [Install] WantedBy=basic.target Remind to change the ''''. Then save the file and enable the service with: sudo systemctl enable wol-enable.service // Sourced from [[https://wiki.ubuntuusers.de/Wake_on_LAN/|wiki.ubuntuusers.de]]//