
In today’s tech-driven world, the inclination towards automation extends to all aspects of our lives—from our vehicles to our homes, and especially within our computing environments. One compelling method to automate the startup of your PC is by utilizing Wake-on-LAN (WoL).Although this guide specifically addresses how to enable WoL on Ubuntu, the instructions can also be adapted for other Linux distributions, including Windows systems.
Understanding Wake-on-LAN
Wake-on-LAN is a networking protocol designed to allow remote power-on of a computer using network packets. These packets, known as magic packets, can be sent from any device on the same local network, including wireless connections.
Each magic packet is encoded with the MAC address of the target computer’s network interface card (NIC), providing a unique identifier. When the NIC, which continues to operate in a low-power state, receives the magic packet, it prompts the motherboard to initiate the startup sequence.
Preparing Your System for Wake-on-LAN
To begin, you must ensure your setup meets the following prerequisites:
- A wired Ethernet connection (Wi-Fi options usually have limited functionality).
- A motherboard and network card certified for WoL (most contemporary models support this feature).
- Appropriate BIOS/UEFI configurations that enable WoL.
- Admin privileges on your Ubuntu system.
Verifying Hardware and BIOS Settings
First, confirm that your hardware is compatible with Wake-on-LAN. Most modern desktops and laptops offer this capability, but a verification step is wise.
To check, restart your computer and enter the BIOS/UEFI settings (commonly accessed by pressing F2, F10, Del, or Esc —watching the boot screen for guidance).Search for options labeled Wake-on-LAN, Power on by PCI-E, or Allow PCI Wake-Up Event, and ensure they are set to Enabled.
Additionally, you may need to disable a feature named ErP Ready or Deep Sleep, which can entirely cut power to the NIC and prevent it from receiving the magic packet. Additionally, some laptops necessitate enabling settings like Always On USB for the network card to stay powered while the system is off or in sleep mode.
Checking Network Card Compatibility
Your network card must support Wake-on-LAN for this process to work effectively. Most cards manufactured in the past decade include this functionality, but it’s prudent to verify.
To identify your network card, execute the following command in the terminal:
ip a
Your Ethernet interface name will be similar to enp8s0
, which serves as an example in this guide.

Ethtool, an open-source tool for modifying network driver settings, is essential for Wake-on-LAN configurations.
Install Ethtool using the following command:
sudo apt install ethtool
Next, check whether your network card supports WoL with:
sudo ethtool <Your interface name>
The output will provide crucial information, including the line:
Supports Wake-on: g
The presence of “g”confirms WoL compatibility, while the next line indicates if it’s currently enabled.
Enabling Wake-on-LAN Temporarily
To activate WoL temporarily (until the next restart), utilize the following command:
sudo ethtool -s <interface_name> wol g
To confirm the change, run:
sudo ethtool <interface_name>
If the output includes Wake-on: g
, WoL is successfully active, albeit temporarily.
Permanently Enabling Wake-on-LAN
To ensure Wake-on-LAN remains active through system reboots, configure a Systemd service that automatically executes the ethtool command at system startup—a reliable method for maintaining settings on modern Linux distributions.
First, you need to create a systemd service file. While using nano
is recommended, you may opt for any text editor that suits your preference:
sudo nano /etc/systemd/system/wol.service
If unsure of etahtool’s install location, run:
which ethtool
Insert the following into your service file:
[Unit] Description=Enable Wake On Lan [Service] Type=oneshot ExecStart=<Your filepath> --change <Your ethernet interface name> wol g [Install] WantedBy=basic.target
After pasting the configuration and replacing
Next, enable the newly created service so it executes upon boot using the command:
sudo systemctl enable wakeonlan.service
You can start the service immediately without rebooting using:
sudo systemctl start wakeonlan.service
Your Ubuntu computer is now configured for persistent Wake-on-LAN activation across reboots.
Configuring with the Advanced Network Connection Editor
For users running Ubuntu Desktop, the simplest way to activate Wake-on-LAN is through the graphical Advanced Network Connection Editor.
Open this tool via the Applications menu.

In the Network pane, locate your Ethernet connection, click the gear icon, and access the connection settings.

Within the Ethernet settings tab, find the option for Wake on LAN. Check the box labeled Magic or MagicPacket, and hit Apply.

Your Wake-on-LAN is now successfully configured. To verify, execute:
sudo ethtool enp0s3
Look for Wake-on: g
in the results.
Activating WoL with nmcli (Network Manager Command Line Interface)
If you’re an Ubuntu Desktop user, you’re likely already acquainted with NetworkManager. This tool simplifies connectivity to both Wi-Fi and wired networks, but it also allows command-line configurations using nmcli
.
Begin by identifying your active network connections:
nmcli connection show
If the output states 802-3-ethernet.wake-on-lan: default
, WoL is disabled. Should it display “magic, ”your system is already configured to respond to such packets.
To enable Wake-on-LAN via NetworkManager, execute the following command:
nmcli connection modify 802-3-ethernet.wake-on-lan magic
After running this command, your Ubuntu Desktop should now be prepared to respond to magic packets, although you might not receive immediate feedback.
If needed, disabling it is equally simple. Just change “magic”to ignore
:
nmcli connection modify 802-3-ethernet.wake-on-lan ignore
This command instructs your network adapter to ignore incoming magic packets, thereby disabling the Wake-on-LAN functionality for that connection.
Testing Your Wake-on-LAN Configuration
To test your WoL setup, either shut down or suspend your Ubuntu machine. Then, use another device (be it a PC, smartphone, Raspberry Pi, etc.) to send a magic packet to the MAC address of your machine. There are numerous applications and command-line tools available; search for “Wake-on-LAN”in your preferred app store.
If you have another Linux or macOS system on your network, you can directly dispatch a magic packet through the terminal using a utility called wakeonlan.
For those using Debian/Ubuntu-based distributions, install it as follows:
sudo apt install wakeonlan
Sending a magic packet is straightforward:
wakeonlan <Your Ubuntu MAC Address>
Make sure to replace with the actual MAC address of your Ubuntu machine.
Windows users can also easily access various free utilities, with a notable option being WakeMeOnLan by NirSoft. This portable application scans your network and facilitates sending magic packets. Alternatively, advanced users can leverage PowerShell for command-line operations, albeit requiring slightly more setup.
Enabling Wake-on-WiFi (WoWLAN)
With the capability to turn on your PC via LAN established, how can one set up wireless Wake-on-LAN or WoWLAN? Currently, there exists only one snap application (network-manager) that offers this functionality.
You can either install it through the Snap Store or the terminal using:
sudo snap install network-manager

Note that this application has received a low user rating of one star in the store. However, during our testing, it performed adequately in terminal mode and includes comprehensive documentation by Canonical.
Alternative attempts to activate WoWLAN through different network managers may face limitations, as the default (networkd) lacks an enabling method.
To activate wireless wake-on-LAN, use the command:
sudo snap set network-manager wifi.wake-on-wlan=magic
If security is a concern, especially over open networks, set your password using:
sudo snap set network-manager wifi.wake-on-wlan-password=<Your password>
This method boasts advantages over ethtool in terms of installation speed and wireless WoL capability. Because it operates at the kernel level, it can still facilitate wake-on-LAN after power disruptions.
However, Canonical advises its use mainly for Ubuntu Core users, possibly to minimize the risk of disrupting users’ OS stability.
Frequently Asked Questions
Can I power down my PC using Wake-on-LAN?
Wake-on-LAN is strictly for waking your PC from sleeping or powered-off states, not for powering it down.
Is enabling Wake-on-LAN a security risk?
No system is entirely risk-free. Nevertheless, Wake-on-LAN requires authorization to resume operation. As long as you safeguard your devices with strong passwords, maintain encryption for sensitive data, and avoid unsecured networks, it is generally safe to enable WoL.
What if Wake-on-LAN stops working after my device loses power?
Changes implemented using ethtool don’t persist through power interruptions. Log back into your system to re-enable the service. In contrast, configurations set via the network-manager method will remain intact, even after power loss.
Leave a Reply ▼