Skip to Content

Why Can't I Remotely Power On My Ubuntu Computer When I Need It Most?

Let me help you understand this powerful feature that can save you countless trips to your computer room. Wake-on-LAN lets you turn on your Ubuntu machine from anywhere on your network. I've been using this feature for years, and it's a real time-saver.

What Makes Wake-on-LAN So Useful?

Wake-on-LAN works through something called a "magic packet." Think of it as a special message that travels through your network to wake up your sleeping computer. Your network card stays partially awake even when your computer is off, listening for this specific signal.

When your network card gets this magic packet, it tells your motherboard to power everything back up. It's like having a remote control for your computer's power button.

Getting Your System Ready

Before we start, you need a few things in place:

  • A wired internet connection (Wi-Fi wake-up is tricky and often fails)
  • A modern motherboard and network card (most computers from the last 10 years work fine)
  • Access to your computer's BIOS settings
  • Admin rights on your Ubuntu machine

Setting Up Your Hardware

First, restart your computer and get into the BIOS. You'll usually press F2, F10, Delete, or Escape when your computer starts up. Look for settings with names like "Wake-on-LAN" or "PCI Power Up." Turn these on.

You might also need to turn off something called "ErP Ready" or "Deep Sleep." These power-saving features can cut power to your network card completely, which stops wake-on-LAN from working.

Checking Your Network Card

Your network card needs to support this feature. Most cards made in the last decade do, but let's check to be sure.

Open your terminal and type:

ip a

Look for something like "enp8s0" - that's your network card's name. Write it down because you'll need it later.

Next, install a tool called ethtool:

sudo apt install ethtool

Now check if your card supports wake-on-LAN:

sudo ethtool <your interface name>

Look for these two lines in the output:

  • "Supports Wake-on: g"
  • "Wake-on: g"

The first line tells you if your card can do wake-on-LAN. The second shows if it's currently turned on.

Turning On Wake-on-LAN Temporarily

To enable wake-on-LAN until your next restart, run:

sudo ethtool -s <interface_name> wol g

Check if it worked by running the ethtool command again. If you see "Wake-on: g," you're good to go.

Making Wake-on-LAN Permanent

The temporary method stops working when you restart your computer. To make it permanent, we'll create a system service that turns it on automatically every time your computer starts.

Create a new service file:

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

Paste this content into the file:

[Unit]
Description=Enable Wake On Lan

[Service]
Type=oneshot
ExecStart=/usr/sbin/ethtool --change <your ethernet interface name> wol g

[Install]
WantedBy=basic.target

Replace <your ethernet interface name> with your actual interface name. Save the file by pressing Ctrl+X, then Y, then Enter.

Enable the service to run at startup:

sudo systemctl enable wol.service

You can start it right now without restarting:

sudo systemctl start wol.service

Using the Graphical Method

If you prefer clicking instead of typing commands, Ubuntu's network settings can help. Open your network settings from the applications menu. Find your wired connection and click the gear icon.

In the Ethernet tab, look for "Wake on LAN" and check the box next to "Magic" or "MagicPacket." Click Apply, and you're done.

Using NetworkManager Commands

Ubuntu Desktop uses NetworkManager by default. You can configure wake-on-LAN through its command-line tool:

nmcli connection show

This shows your network connections. To enable wake-on-LAN:

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

To turn it off later:

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

Testing Your Setup

Shut down your Ubuntu computer completely. From another device on your network, you'll need to send a magic packet to your computer's MAC address.

On another Linux computer, install the wakeonlan tool:

sudo apt install wakeonlan

Then send the magic packet:

wakeonlan <your Ubuntu MAC address>

Windows users can download free tools like WakeMeOnLan from NirSoft. Phone users can find wake-on-LAN apps in their app stores.

Wireless Wake-on-LAN

Wireless wake-on-LAN is trickier and less reliable. Ubuntu has a snap package that might work:

sudo snap install network-manager

Enable wireless wake-on-LAN:

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

This method is experimental and not officially recommended for regular Ubuntu installations.

Common Questions

Can I shut down my computer remotely too? Wake-on-LAN only turns computers on, not off. You'd need different tools for remote shutdown.

Is this safe? It's reasonably safe since only devices on your local network can wake your computer. Your computer still requires login after waking up.

What if my power goes out? The ethtool method stops working after power loss. You'll need to log in again to restart the service. The NetworkManager snap method should survive power outages.

Wake-on-LAN transforms how you interact with your Ubuntu machine. No more walking to another room just to turn on your computer. Set it up once, and you'll wonder how you lived without it.