
You might be tired of switching on your PC manually, craving a world where you give a command, and the machine wakes up on its own. If so, let’s get into the Wake-on-LAN magic. This tutorial will let you automate your PC startup, waking up the one distant from you. Though we go for the Ubuntu method, Wake-on-LAN power is not limited to a single system. You can adapt these steps to any Linux flavor or even use it on a Windows system. May the automation take place!
What Is Wake-on-LAN?
Imagine a world where your computer springs to life when you give it the command, wherever your location may be. This is the great power of Wake-on-LAN, a nifty technology that allows activating your machine from across the network. You send a secret code, known as a magic packet, across the network, wired or wireless, letting the computer know it should wake up from its slumber. It has the feeling of a kind digital butler, ever eager to serve.
Imagine this: a secret knock, a digital whisper to awaken sleeping computers. The magic packet is the messenger endowed with the unique MAC address of that particular computer-the digital footprint. Even if the computer is turned off, the network card is forever listening-the card waits for the magic packet. When they hear their spells said out loud, they begin to ring loud and clear: an alarm clock awakens the motherboard.
Prepare Your Setup for Wake-on-LAN
Before jumping in, make sure you’ve met these basic requirements:
- Wired Ethernet connection (Wi-Fi WoL is limited and often unreliable)
- A compatible motherboard and network card (most modern ones support it)
- BIOS/UEFI settings that support WoL
- Administrative access to your Ubuntu machine
Check your hardware and BIOS settings
Wake-on-LAN is a marvelous thing…but before appreciating any glamour, a little check must be done at the hardware end. Think of it as a secret handshake-how is your machine to get it? Most new desktops and many laptops speak this language with ease, but a little check would save an evening of frustration. Are you hardware ready to wake up?
Is your PC a ghost? Maybe, just maybe, it is sleepingreallydeeply. Go into the BIOS settings and look for “ErP Ready” or “Deep Sleep.” Such power-saving features may be stealthily cutting power from the network card, blocking the “magic packet” that should wake it. Laptop users, watching out for “Always On USB” is paramount. It’s the secret recipe that keeps the network card powered when the laptop is catching some zzz’s.
Check if your network card supports Wake-on-LAN
Wake-on-LAN? Your network card probably speaks that language. It’s been something of a standard for a little more than a decade, so odds are good for you. Still, it may never hurt checking a spec of your device just to be sure.
Unleash your device’s hidden identity! Ever wondered what unique name your Ethernet interface – your network card – goes by? A simple terminal command will unveil its secret moniker.
“`
ip
a “`
If you spot a network card called something likeenp8s0
, this particular one is going to be the basis on which our tutorial will be hung; think of it as your unique network identifier for this ride.

Now is the time to unlock some of those magic powers using ethtool. It is a wonderful open-source tool that puts you in the driver’s seat one way or another. You can manipulate settings, but the real fun is in empowering Wake-on-LAN to make the sleeping PC an aggressive listener that will become awake anytime through a moment’s notice.
The command to install ethtool is:
“`
sudo
apt
install
ethtool “`
Next, find out whether your network card supports wake on LAN.
“`
sudo
ethtool<
Your interface name
“`
You’ll be given detailed information on your Ethernet interface hardware. We are looking for:
Supports Wake-on: g Wake-on: g
That first line? That is a secret code for revealing your computer’s Wake-On-LAN capability. There is a “g” somewhere in there-the golden ticket. Dismiss the other hieroglyphs for now; all you really need is “g.””
The second line reveals the status of Wake-On-LAN. But hold that thought – we’re about to unleash its power anyway!
Enable Wake-on-LAN Temporarily
Enabling Wake-on-LAN tells the NIC to wake the system only when it receives the specific magic packet.
To enable Wake-on-LAN temporarily, run:
“`
sudo
ethtool
-s<
interface_name
wol g “`
This enables WoL until the next reboot. To verify it worked, run:
“`
sudo
ethtool<
interface_name
“`
“Wake-on: g” spotted! That’s WoL setting enabled! But don’t get too happy because the ethtool setting is gone with every reboot, leaving your system to slumber away, ignoring your wake-up calls.
Enable Wake-on-LAN Permanently
Getting tired and fed up with Wake on LAN vanishing after every system reboot? Then, let us silence those maddening restarts! Remote access has its fullest potential unleashed on your Ubuntu machine. Consider this, above all: Make your system a good fortress that always keeps Wake-on-LAN alive, even through reboots. We will build that small, yet powerful systemd service that will arm your network card with Wake-on-LAN sorcery every startup. Get ready to control your nifty machine via sorcery magic from anywhere without breaking a sweat 🙂
So then, how about summoning a new service from systemd? I love nano because of its simplicity; then, of course, there’s the Vi editor. Click open in your favorite editor, and let’s get going.
“`
sudo
nano
/
etc
/
systemd
/
system
/
wol.service “`
If you’re unsure where ethtool is installed, run:
“`
which
ethtool “`
Paste the following into the 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 “`
Done editing? Yes, this is where you do the big finish. PressCtrl
+X;
from there, Nano shall prompt you to save it or not. Choosing to save, just typeY,
and then hit thatEnter
key like you mean it to lock down your changes. Boom! File Saved: Mission Accomplished!
Now let the daemon be unleashed! In all cases, a single command to start the service and activate it at every system boot. Just had to persuade systemd, our init system, to create the activation link which would bind our service to the startup sequence.
“`
sudo
systemctl
enable
wakeonlan.service “`
After enabling, you can optionally start the service immediately without rebooting with this:
“`
sudo
systemctl start wakeonlan.service “`
Now, your Ubuntu Server or Desktop, should have Wake-on-LAN persistently enabled across reboots.
Using the Advanced Network Connection Editor
For most Ubuntu desktop users, the graphical Network connection editor provides the simplest way to enable Wake-on-LAN.
Simply, open the Advanced Network connection Settings from the Applications’ Menu.

In the Network panel, you’ll see your wired connection listed. Click on the gear icon and open the connection’s settings.

Jump into your Ethernet settings now and check for “Wake on LAN.” If it’s there, well, great! Now, enable the magic by checking the Magic Packet box. It’s just like sending a secret code over the network to wake the computer from standby. Click on “Apply,” and now you are good for the instant gratification.

That’s it! You’ve successfully enabled Wake-on-LAN. To verify, run:
“`
sudo
ethtool enp0s3 “`
Look forWake-on: g
in the output.
Enabling WoL with nmcli (Command Line Network Manager)
Are you tired of dealing with ugly network settings? If Ubuntu Desktop is your primary operating system, then NetworkManager stands as the sidekick. No more cryptic commands-there’s a pretty GUI to help you log on to Wi-Fi or click your way through a wired network. But here’s the killer: underneath that shiny frontend isnmcli
, a horribly powerful command-line utility just longing for you to configure the network to your liking.
With that behind us, it only makes sense that we first observe our network landscape. An analogy goes: consider this as guerrilla reconnaissance. We want to know the kind of connections out there, active or inactive.
nmcli connection show
If the output shows802-3-ethernet.wake-on-lan: default
, WoL remains disabled. If it shows magic, then congratulations, it’s already enabled.
To enable Wake-on-LAN using NetworkManager, we’ll modify the connection setting to listen for the magic packet:
“` nmcli connection modify
802
–
3
-ethernet.wake-on-lan magic “`
The set-up is so nice that all it needs is a flick of the wrist to wake up your sleeping Ubuntu Desktop. Magic packets are what actually bring your machine back to life. It is all so quiet and obedient with none of the fans or fireworks that accompany an unusual show. Just consider it done-the digital slumber party is over.
Disabling it is just as easy. Instead of magic, simply useignore
:
“` nmcli connection modify
802
–
3
-ethernet.wake-on-lan ignore “`
Silence the awakened beast. Issuing this command will make your network adapter entirely ignore the dreaded “magic packets,” for they should not haunt the land of “forgotten features” any longer.
Testing Your Wake-on-LAN Setup
Wake that sleeping actuated Ubuntu PC from afar. First, put your computer to sleep: or otherwise shut it down entirely. Subsequently, send a magic packet to its MAC address from some other device, which could be your phone, a Raspberry Pi, or even another computer. Think of it as a digital Bat-Signal. You’ll need the tech for that: search “Wake-on-LAN tool” in your app store. Witness a revival of your Ubuntu box!
Say goodbye to staring at the GUI and enter the wonderful world of command line!wakeonlan
is just the little helper tool you need to send a magic packet and wake up that sleeping computer.
On Debian/Ubuntu-based systems:
“`
sudo
apt
install
wakeonlan “`
Once installed, sending a magic packet is as simple as:
“` wakeonlan<
Your Ubuntu MAC Address
“`
Replace with the MAC address of your Ubuntu machine.
Windows users, rejoice! You surely have many avenues to wake up your machines remotely. For the very simple, no-install-from-an-unknown-source-needed overlook on an outstanding Wake-on-LAN solution, check out NirSoft’s WakeMeOnLan. This tiny little tool detects all the devices on your network and legitimately gives you the chance to wake any one of them up from their slumber with the so-called “magic packet.” Techier kinds will enjoy the PowerShell way! It’s the command-line ninja that will do just as well, though it will require a bit more configuration. Point and click-based applications tend to be the quickest and simplest means to awakening any given PC from hung particular state.
How to Enable Wake-on-WiFi (WoWLAN)
Remotely turning PCs on? You know the drill: Wake-on-LAN. But what if you’re untethered, soaring over the Wi-Fi waves? Wireless Wake-on-LAN (WoWLAN) seems magical tech, and frankly, the options are slim. The only known Snap app that supports this wireless wake isnetwork-manager
.
You can install this from the snap store or the terminal using the following command:
“`
sudo
snap
install
network-manager “`

A one-star rating should really ring a few warning bells. This app practically cleaned house in its final exam and allegedly boasts a comprehensive Canonical documentation, yet user reviews paint a different picture. The wary should approach at their own risk.
You can attempt to enable woWLAN using another network manager, but the default (networkd) has no method of enabling it.
You can enable wireless wake-on-LAN using this command:
“`
sudo
snap
set
network-manager wifi.wake-on-wlan=magic “`
If you’re on an open network or wary of security threats, you can set a password using:
“`
sudo
snap
set
network-manager wifi.wake-on-wlan-password=<
Your password
“`
Go by ethtool! Speedy installation with this technique; go wild with wireless Wake-on-LAN! With kernel-level access, even when Blackout comes in, you have remote wake-from-sleep option.
Although Canonical fights for it, Ubuntu Core users only hear a whisper of the word. This is hush-hush stuff, as they say: think digital fortresses. This witty isolation puts the applications behind bars, protecting the running environment from accidental interference by users. It is not really an all-purpose blessing but more of a surgically applied tool.
Frequently Asked Questions
Can I power down my PC using Wake-on-LAN?
Pathos weighs in against Wake-on-LAN! Your computer may wake up from slumber and power off with no magic packets sent. Read on to get more information on how to wake your machine using alternative methods.
Is it a security risk to enable Wake-on-LAN?
Wake-on-LAN: is it safe or sorry? Nothing is guaranteed 100%. The only computers able to wake up your box remotely would be ones within your network. So, it is like a digital doorbell only that your housemates can ring it. Ubuntu itself also stands as a checkpoint after wake-up, asking for your password. Ditch public Wi-Fi, lock your network down with Fort Knox-level passwords, encrypt sensitive files, and then enabling Wake-on-LAN shall be a calculated risk you must take.
After my device lost power, Wake-on-LAN no longer works. How can I fix this?
Ethtool config settings disappear with a sudden power outage. Your settings will have to be reapplied after you restart and reconnect, unless you were using Network Manager. The Network Manager approach holds through the storm of sudden power loss. The configurations will remain.
Thanks for reading How to Enable Wake-on-LAN in Ubuntu