Introduction#
Wake-on-LAN (WoL) lets you power on your Ubuntu system remotely by sending a magic packet.
On Ubuntu 26.06, you can enable WoL directly in Netplan by setting wakeonlan: true on your network interface.
Prerequisites#
Before you start, make sure:
- Wake-on-LAN is enabled in your BIOS/UEFI,
- your system is connected using Ethernet (WoL over Wi-Fi is usually unsupported),
- you know your interface name (for example
ens33), and - you have sudo access.
Find Your Netplan File#
List available Netplan config files:
ls /etc/netplan/
You will usually see something like:
00-installer-config.yaml
or:
50-cloud-init.yaml
Open your file (replace with your actual filename if different):
sudo nano /etc/netplan/00-installer-config.yaml
Enable Wake-on-LAN in Netplan#
Add wakeonlan: true under your Ethernet interface.
Example:
network:
version: 2
ethernets:
ens33:
dhcp4: true
wakeonlan: true
If you already use a static IP, keep your existing settings and just add:
wakeonlan: true
under the correct interface block.
Apply the Configuration#
Validate the Netplan syntax first:
sudo netplan try
If it looks good, apply permanently:
sudo netplan apply
Test Wake-on-LAN#
From another device on your network, send a magic packet to this machine’s MAC address.
If your system powers on, Wake-on-LAN is configured correctly.
Conclusion#
You have enabled Wake-on-LAN on Ubuntu 26.06 using Netplan. This makes it easy to remotely power on your system when needed, while keeping your network configuration clean and persistent across reboots.