How to Enable Persistent Wake-on-LAN in Ubuntu (NetworkManager / Netplan)
Ubuntu resets Wake-on-LAN after every reboot. Five steps to make it permanent with NetworkManager — and to check whether your NIC supports magic packets at all.
Wake-on-LAN (WoL) lets you power on your Ubuntu machine remotely by sending a "magic packet". Ubuntu often resets the setting to disabled after a reboot — here is how to make it stick on systems that use NetworkManager and Netplan.
Step 1: Verify hardware support
Check whether your network card supports Wake-on-LAN. Run ethtool with administrative privileges:
sudo ethtool eno1Look at the bottom lines of the output:
Supports Wake-on: pumbg— thegmeans it supports magic packets.Wake-on: d— currently disabled.
Step 2: Find the connection profile name
Modern Ubuntu setups mix Netplan and NetworkManager, so find the exact name of the profile that controls your interface:
nmcli connection showLook under the NAME column. In my setup Netplan generated a profile called netplan-eno1.
Step 3: Make the setting permanent
Instead of writing custom startup scripts, tell NetworkManager to enable Wake-on-LAN every time the interface comes up:
sudo nmcli connection modify "netplan-eno1" 802-3-ethernet.wake-on-lan magicApply the change immediately:
sudo nmcli connection up "netplan-eno1"Step 4: Get the MAC address
You need the target machine's hardware address to wake it from another device:
ip link show eno1Copy the 12-character address right after link/ether (e.g. a1:b2:c3:d4:e5:f6).
Step 5: Test it
Shut the Ubuntu machine down and send the magic packet from another device on the same network.
From a Mac:
brew install wakeonlan
wakeonlan <MAC_ADDRESS>From another Linux machine:
sudo apt install wakeonlan
wakeonlan <MAC_ADDRESS>