This guide explains how to enable Wake-on-LAN (WOL) on Linux after it has already been enabled at the hardware / firmware level.
Wake-on-LAN on Linux works only with wired Ethernet connections. It does not work reliably over Wi-Fi.
This guide applies to most modern Linux distributions, including:
Applies only to systems using:
Before continuing, make sure that:
If BIOS / UEFI is not configured yet, do this first:
→ Enable Wake-on-LAN in BIOS / UEFI
No MAC address is required at this stage.
Open Terminal and run:
ip link
Look for the active Ethernet interface.
Common names include:
eth0enp3s0enp0s25Ignore:
lowlan0, wlpXsY)You will use this interface name in the next steps.
Run the following command, replacing INTERFACE with your Ethernet interface
name:
sudo ethtool INTERFACE
Look for the line:
Supports Wake-on: Wake-on:
Example:
Supports Wake-on: pumbg Wake-on: d
Meaning:
g = Wake on Magic Packet (required)d = disabledIf g is not listed under Supports Wake-on, the network card does not
support Wake-on-LAN.
To enable Wake-on-LAN (magic packet):
sudo ethtool -s INTERFACE wol g
Verify the change:
sudo ethtool INTERFACE
The output should show:
Wake-on: g
This enables Wake-on-LAN at the operating system level.
On many Linux systems, Wake-on-LAN settings reset after reboot.
You must make the configuration persistent.
Create or edit a dispatcher script:
sudo nano /etc/NetworkManager/dispatcher.d/99-wol
Add the following content:
#!/bin/sh
if [ "$2" = "up" ]; then /usr/sbin/ethtool -s INTERFACE wol g fi
Replace INTERFACE with your Ethernet interface name.
Make the script executable:
sudo chmod +x /etc/NetworkManager/dispatcher.d/99-wol
Create a systemd service:
sudo nano /etc/systemd/system/wol.service
Add:
[Unit] Description=Enable Wake-on-LAN After=network.target
[Service] Type=oneshot ExecStart=/usr/sbin/ethtool -s INTERFACE wol g
[Install] WantedBy=multi-user.target
Replace INTERFACE with your Ethernet interface name.
Enable the service:
sudo systemctl enable wol.service
Wake-on-LAN on Linux works when the system is in:
Requirements:
After shutting down the system:
This indicates the network interface is still powered and listening.
ip link