Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Enable and Test Wake-on-LAN on Ubuntu

Enable Wake-on-LAN in firmware and Ubuntu, make it persist with NetworkManager or Netplan, and test from a second device on your local network.

Table of Contents

To wake an Ubuntu computer over the network, enable Wake-on-LAN in the firmware and on its Ethernet adapter, then send a magic packet to that adapter’s MAC address. Start with a wired connection and test from another device on the same local network.

1. Check firmware and the Ethernet interface

In BIOS or UEFI, look for Wake-on-LAN or a setting such as Power on by PCI-E. Some systems can wake from suspend but cut power to the adapter during shutdown. Consult your model’s documentation before changing settings such as ErP or Deep Sleep.

On Ubuntu, open a terminal and find the wired interface. The name might look like enp8s0. The corresponding link/ether line contains its MAC address.

ip -br link
ip link show enp8s0
sudo apt install ethtool
sudo ethtool enp8s0

How to Enable Wake-on-LAN in Ubuntu Picture 1

Replace enp8s0 with your actual interface name. Look for g in Supports Wake-on. If the adapter doesn’t report magic-packet support, check the driver and hardware documentation before continuing.

2. Enable it temporarily and test

sudo ethtool -s enp8s0 wol g
sudo ethtool enp8s0

Verify that the output includes Wake-on: g. Put the Ubuntu computer to sleep, then use a Wake-on-LAN sender on another device on the same network. Enter the wired adapter’s MAC address. Test from shutdown separately if your hardware supports it. This ethtool change can be reset when the connection restarts or the computer reboots.

3. Save the setting in your network configuration

NetworkManager on Ubuntu Desktop

Open Advanced Network Configuration or run nm-connection-editor if it’s installed.

How to Enable Wake-on-LAN in Ubuntu Picture 2

Choose the wired connection and open its settings.

How to Enable Wake-on-LAN in Ubuntu Picture 3

On the Ethernet tab, choose Magic for Wake-on-LAN and save.

How to Enable Wake-on-LAN in Ubuntu Picture 4

You can also update the profile from a terminal. Use the profile name shown by the first command. Reconnect from the console or restart later if interrupting a remote connection would be a problem.

nmcli -f NAME,TYPE,DEVICE connection show --active
sudo nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic

See the NetworkManager Ethernet settings for details.

Netplan with systemd-networkd

On a server managed by Netplan with the networkd renderer, add wakeonlan: true under the existing Ethernet interface in its Netplan file. Keep the current addressing settings and YAML indentation. On a local console, use sudo netplan try to test the change before keeping it. See the Netplan YAML reference for the interface options.

After activating the saved configuration or rebooting, recheck Wake-on: g and repeat the wake test. If the packet doesn’t arrive, use the Ethernet troubleshooting guide to verify the cable and local network. Keep the initial test local so router forwarding and guest-network isolation don’t complicate it.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.