Leon Anavi
IT Tips && Tricks

PC

Created: 24.01.2026 07:08 Last Modified: 24.01.2026 07:18 Views: 7
Keywords: Ethernet, LAN, Linux, PC, systemd, Ubuntu, Wake-on-LAN, WoL

Setting Up Wake-on-LAN on Ubuntu 24.04 LTS

Wake-on-LAN is a convenient way to keep a system powered off most of the time while still being able to turn it on remotely when needed. This is especially useful for home servers, NAS devices, or development machines that only need to run occasionally for tasks like SSH access, backups, container workloads, or file transfers.

This video guide follows the setup demonstrated in the video and shows how to configure Wake-on-LAN on a Fujitsu Futro S920 running Ubuntu 24.04 LTS Server. While interface names and drivers may differ between systems, these steps represent a common and reliable approach on Ubuntu 24.04 LTS.

Step 1: Check Wake-on-LAN Support

First, verify that your network interface and driver support Wake-on-LAN. This command is purely diagnostic and shows the current capabilities and settings of the interface.

sudo ethtool enp1s0

Look for the Wake-on line in the output. If the interface supports WoL, it will list available modes such as g.

Step 2: Enable Wake-on-LAN Temporarily

Next, enable Wake-on-LAN in magic packet mode. This allows the system to wake when it receives a WoL magic packet, but this change will not persist across reboots.

sudo ethtool -s enp1s0 wol g

At this point, Wake-on-LAN is active, but only until the next restart.

Step 3: Create a systemd Service for Persistent WoL

To ensure Wake-on-LAN is enabled automatically on every boot, create a custom systemd service.

sudo vim / etc / systemd / system /wol.service

Add the following contents to the file:

[Unit]
Description=Enable Wake-on-LAN
After=network.target

[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s enp1s0 wol g

[Install]
WantedBy=multi-user.target

This service runs once at boot, after the network stack is initialized, and re-applies the Wake-on-LAN setting.

Step 4: Reload systemd and Enable the Service

After saving the service file, reload systemd so it becomes aware of the new unit, then enable and start the service.

sudo systemctl daemon-reload
sudo systemctl enable wol.service
sudo systemctl start wol.service

The service will now run automatically on every boot, and starting it manually applies the setting immediately without requiring a reboot.

Step 5: Test Wake-on-LAN

From another machine on the same network, send a magic packet to the target system's MAC address.

wakeonlan MAC

If everything is configured correctly, the Ubuntu system should power on as soon as it receives the packet.

With Wake-on-LAN properly configured, your Ubuntu 24.04 LTS system can stay powered off when idle while remaining instantly available whenever you need it.



  Home | About | Contact | Disclaimer | Sitemap © 2009-2022 Leon Anavi. All rights reserved.