How to Enable Wake-on-LAN in Ubuntu

by Lenny Zulauf
19 minutes read

How to Enable Wake-on-LAN in Ubuntu


How To Enable Wake On Lan In Ubuntu

We with one voice feel the impulse to automate every little thing: our autos, abodes and particularly our computer systems. Wake-on-LAN is the above reproach means to automate pivoting your PC on. While this guide concentrates on how to permit Wake-on-LAN in Ubuntu, you can apply it to any Linux distro, and even situate the amenity in Abode windows.

What Is Wake-on-LAN?

Wake-on-LAN is a networking conventional that makes it possible for you to turn on or awaken your computer by a network blog post. This blog post, defined a sorcery packet, is sent from an additional equipment on the exceptionally same stretch network, or even via wirelessly.

The sorcery packet has the MAC address of the target computer’s network interface card (NIC), which uniquely recognizes the hardware. When the NIC, which stays in a decreased-power enumerate even once the computer is off, receives this packet, it signals the motherboard to power up the mechanism.

Design Your Configuration for Wake-on-LAN

Before jumping in, render sure you’ve met these conventional requirements:

  • Wired Ethernet relation (Wi-Fi WoL is limited and routinely imprecise)
  • A apt motherboard and network card (most vibrant ones promote it)
  • BIOS/UEFI settings that promote WoL
  • Management schedule to your Ubuntu equipment

Review your hardware and BIOS settings

First of all, you need to guarantee your hardware advise Wake-on-LAN. Various vibrant desktop computers, and the majority of laptops do, but it’s still well worth twin-inspecting.

Restart your computer and press the proportionate fulcra to amass in BIOS/UEFI (usually F2, F10, Del, or Esc – watch the display display throughout boot). Attractiveness for backups guidance Wake-on-LAN, Power on by PCI-E, PCI Power Up, or Enable PCI Wake-Up Festival. The exact tag differs by manufacturer. Ascertained the accord to Made it possible for.

You might also need to immobilize a amenity defined ErP With one voice started or Deep Rest, as these power-conserving modes can totally incision power to the network card, derailing it from retrieving the sorcery packet. Some laptops also requirement settings guidance Always On USB to promote the network card powered while off or hibernating.

Review if your network card advise Wake-on-LAN

For Wake-on-LAN to job, your Ethernet card requirements to promote the amenity. It has been conventional for at the terribly least 10 years, so odds are high your card will, but it is always nice to twin-review.

Your Ethernet interface is the network card of your equipment. Every card has a extraordinary tag detected via the functioning with via incurable command:

ip a

The tag you’re peeking for is the exceptionally same to enp8s0. This was the extraordinary ID of the network card supplied in this tutorial.

Wake-on-Lan
How to Enable Wake-on-LAN in Ubuntu 20

Ethtool is an open-source application that makes it possible for you to fluctuation network vehicle driver settings. For wake-on-LAN, it makes it possible for your PC to become aware the information it’s retrieving.

The command to place ethtool is:

sudo apt install ethtool

Next off, situate out whether your network card advise wake on LAN.

sudo ethtool <Your interface name>

You’ll be posed defined lays out on your Ethernet interface hardware. We are peeking for:

Supports Wake-on: g
Wake-on: g

The initially queue tells you whether your PC advise Wake-On-LAN. There might be dissimilar other letters along via the g. For presently, we lone requirement the g.

The 2nd queue confirms whether Wake-On-LAN is permitted. Donned’t agitation also much about that, as our next project will be to permit it.

Enable Wake-on-LAN Momentarily

Permitting Wake-on-LAN tells the NIC to wake the mechanism lone once it receives the information sorcery packet.

To permit Wake-on-LAN for a little while, dashed:

sudo ethtool -s <interface_name> wol g

This permits WoL until the next reboot. To affirm it scrubed, dashed:

sudo ethtool <interface_name>

If you see Wake-on: g, it methodologies WoL has been profitably permitted. But, the ensconcing used by ethtool is not in covenant and will be lost after a reboot.

Enable Wake-on-LAN Permanently

For Wake-on-LAN to be actually useful, you requirement it to stick harshly permitted even after your Ubuntu equipment restarts. We can attain this by inventing a systemd remedy that instantaneously runs the ethtool command at boot. This is a ordinary and robust means to guarantee settings persevere in vibrant Linux rations.

Initially, let’s version a brand-contemporary systemd remedy record. We’ll make serviceability of nano, a mere message editor, but feel emit to make serviceability of Vi or any dissimilar other editor you guidance:

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

If you’re suspicious wherein ethtool is devise, dashed:

which ethtool

Paste the functioning with via into the remedy record:

[Unit]
Description=Enable Wake On Lan

[Service]
Type=oneshot
ExecStart = <Your filepath> --change <Your ethernet interface name> wol g

[Install]
WantedBy=basic.target

When you’ve pasted the content and amended , preserve the record and run away nano. To do this, press Ctrl + X, after that Y to verify conserving, and last but not the terribly least Enter to verify the filename.

Ultimately, we need to enlighten systemd to permit this brand-contemporary remedy so it runs at every boot. This designs a symbolic linkage that activates the remedy:

sudo systemctl enable wakeonlan.service

After enabling, you can in addition start the remedy conveniently without rebooting via this:

sudo systemctl start wakeonlan.service

Now, your Ubuntu Web server or Desktop, need to have Wake-on-LAN incessantly permitted across reboots.

Gaining make serviceability of of the Evolved Network Relationship Editor

For most Ubuntu desktop computer users, the visual Network relation editor sells the most primary means to permit Wake-on-LAN.

Purely, open the Evolved Network relation Arrangements from the Entreaties’ Nourishment accord.

Opening Evolved Network Rapports Employer
How to Enable Wake-on-LAN in Ubuntu 21

In the Network panel, you’ll see your wired relation supplied. Click on the contrivance icon and open the relation’s settings.

Opening The Network Arrangements Of Ethernet Relationship
How to Enable Wake-on-LAN in Ubuntu 22

In the Ethernet settings tab, commendable aesthetics for Wake on LAN. Review the box started as Sorcery or MagicPacket and hit Use.

Summing up Sorcery Selection Of Wake On Lan Selection
How to Enable Wake-on-LAN in Ubuntu 23

That’s it! You’ve profitably permitted Wake-on-LAN. To affirm, dashed:

sudo ethtool enp0s3

Attractiveness for Wake-on: g in the result.

Permitting WoL via nmcli (Command Queue Network Employer)

If you’re largely utilising Ubuntu Desktop, odds are you’re already familiar via NetworkManager. It’s the visual gizmo that earns tying to Wi-Fi and wired networks a gale. While it’s visual by default, it also advise command-queue arrangement via nmcli.

Initially thing initially, we’ll need to become aware which network relation we’re braving. For that, we will checklist with one voice the strenuous relations:

nmcli connection show

If the result confirms 802-3-ethernet.wake-on-lan: default, WoL stays incapacitated. If it confirms sorcery, after that congratulations, it’s already permitted.

To permit Wake-on-LAN utilising NetworkManager, we’ll fluctuation the relation ensconcing to listen for the sorcery packet:

nmcli connection modify 802-3-ethernet.wake-on-lan magic

After sprinting this, your Ubuntu Desktop equipment need to presently be finalized up to respond to sorcery packets! It’s usually that mere. You might not avail any instant feedback, but the ensconcing has been used.

Devitalizing it is merely as simple. Instead of sorcery, merely make serviceability of ignore:

nmcli connection modify 802-3-ethernet.wake-on-lan ignore

This command tells your network adapter to overstate any incoming sorcery packets, capably pivoting off the Wake-on-LAN performance for that relation.

Screening Your Wake-on-LAN Configuration

To checkup WoL, shut down or swaggered grip your Ubuntu equipment. Then, from an additional equipment (PC, mobile, Raspberry Pi, and so on.), send out a sorcery packet to the equipment’s MAC address. There are plenty of apps and command-queue contraptions for this, comb for Wake-on-LAN gizmo in your app storefront.

If you have an additional Linux or macOS equipment on your network, you can send out a sorcery packet directly from the incurable. You’ll requirement a little utility defined wakeonlan.

On Debian/Ubuntu-based contraptions:

sudo apt install wakeonlan

When devise, sending out a sorcery packet is as mere as:

wakeonlan <Your Ubuntu MAC Address>

Correction via the MAC address of your Ubuntu equipment.

Equally, for Abode windows users, there are several emit utilities available. A vibrant accord is WakeMeOnLan by NirSoft. It’s a little, mobile application that scans your network and makes it possible for you to send out sorcery packets. Alternatively, you can make serviceability of PowerShell for a much more command-queue philosophy, though it requirements a miniscule particle much more arrangement. Dozen of users situate the devoted utilities less complex.

How to Enable Wake-on-WiFi (WoWLAN)

Now you can turn on your PC via LAN, but what about wireless wake-on-LAN or woWLAN? As of this cook up-up, there is lone one snap application (network-supervisor) that makes it possible for you to do this.

You can place this from the snap storefront or the incurable utilising the functioning with via command:

sudo snap install network-manager
Wake On Lan Snap Store
How to Enable Wake-on-LAN in Ubuntu 24

Beware, as this application is lone ranked one celeb in the storefront. Throughout trial and mistake, the application ran as supposed in the incurable, and it has complete-length documents by Granted.

You can attempt to permit woWLAN utilising an additional network supervisor, but the default (networkd) has most clearly no philosophy of enabling it.

You can permit wireless wake-on-LAN utilising this command:

sudo snap set network-manager wifi.wake-on-wlan=magic

If you’re on an open network or skeptical of safety and security threats, you can kit a password utilising:

sudo snap set network-manager wifi.wake-on-wlan-password=<Your password>

There are some comforts to utilising this philosophy over ethtool. It’s faster to place and makes it possible for wireless wake-on-LAN. It has kernel level schedule, so if the computer loses power, you can still make serviceability of wake-on-LAN once power counterarguments.

The complication is that Granted lone prescribes it for Ubuntu core users. There is most clearly no information justification for this, but it’s prospective to promote the application contained and to inhibit users from going versus their OS.

Oftentimes Asked Crises

Can I power down my PC utilising Wake-on-LAN?

You can lone wake your PC from standby or a power-off enumerate. There are methodologies of applying this, and they do not make serviceability of wake-on-LAN.

Is it a safety and security blooper to permit Wake-on-LAN?

Nothing is 100% secure. But, lone constructors on the exceptionally same network can power on your equipment utilising wake-on-LAN. Ubuntu also requirements you to authenticate after powering on. As long as you safeguard versus unsafe Wi-Fi networks, and guard with one voice your constructors (tenacious passwords, encrypt personal information, and so on.) connected to your stretch network, it is quite secure to permit wake-On-LAN.

After my equipment lost power, Wake-on-LAN most clearly no longer jobs. How can I address this?

Ethtool does not persevere once power is lost. Logging in again need to re-permit the remedy. If you supplied the network-supervisor philosophy, it will persevere once you lose power.

Related Posts