System Administration

Essential System Tools: gWakeOnLAN – turn machines on through Wake On LAN

Last Updated on October 17, 2022

This series highlights essential system tools. These are small utilities, useful for system administrators as well as regular users of Linux based systems. The series examines both graphical and text based open source utilities. For details of all tools in this series, please check the table in the summary section.

gWakeOnLAN is a small graphical utility that lets you wake up machines using the Wake on LAN (WOL) feature. WOL lets you wake a computer from a low-power state when a network adapter detects a WOL event. Typically, such an event is a specially constructed Ethernet packet, often known as a “magic packet”. When the packet is received, the target machine’s network device (Network Interface Controller or NIC) wakes up the rest of the machine.

We’re using Ubuntu as our main desktop distribution. Installing gWakeOnLAN is straightforward. Issue the command:

$ sudo apt install gwakeonlan

There’s a few things we need to configure on each machine we want to wake up (we’ll call that the target machine). The precise steps depend on the BIOS of each target machine. For example, with the HP EliteDesk 800 G2 Mini Desktop PC we need to enable boot to hard drive from the network. We also need to set “Energy Efficient Ethernet” to OFF, and to set “Wake on Magic Packet” to Enabled.

It may also be necessary to configure the operating system of the target machine. We need to ensure WOL is enabled in the NIC. In Linux, this can be established with the ethtool utility. Install ethtool with the command:

$ sudo apt install ethtool

Here’s the output below from one of our systems.

ethtool

Look for the line Wake-on:

For this particular system, the g tells us that the Magic Packet is already enabled. We therefore don’t need to make any changes to the operating system. However, if the letter shown was d, the Magic Packet would not be enabled. It can be enabled with the command:

$ ethtool -s wol g

where is the device name of your NIC, e.g. eth0, eno1 etc

This command is required after each boot or we can make an appropriate change to the interfaces file.

If the target machine is running Windows, generally there’s nothing needed to be done. However, we have some systems which required a few changes in the Device Manager and the Control Panel.

In Operation

Here’s an image of gWakeOnLAN in action. The image shows we’ve set up three machines that we can wake up over the LAN.

gWakeOnLAN

To add another machine we click the green + button. We need to enter a name for the machine and its MAC address. A MAC address is a unique physical address assigned to each network adapter in a computer. It is a 48 bit value, consisting of twelve hexadecimal characters. Our router holds this physical address for each computer on our local network.

We then need to click the box next to each machine we want to boot, and click the Turn on button. It’s that simple. A system administrator can therefore turn on many computers across the network at the same time.

Summary

gWakeOnLAN is a really simple and sweet utility. It’s not only useful for system administrators. Even if your network has only two computers, it’s often convenient to be able to turn it on across the network.

The only complexity is that it can take a little investigation to work out what changes are needed for each machine’s BIOS settings.

And remember that for WOL to work, parts of the network interface need to stay on. This consumes a very small amount of standby power.

Website: www.muflone.com/jekyll/gwakeonlan
Support: GitHub Code Repository
Developer: Fabio Castelli
License: GNU General Public License v3.0

gWakeOnLAN is written in Python. Learn Python with our recommended free books and free tutorials.


All the essential tools in this series:

Essential System Tools
AlacrittyInnovative, hardware-accelerated terminal emulator
BleachBitSystem cleaning software. Quick and easy way to service your computer
bottomGraphical process/system monitor for the terminal
btop++Monitor usage and stats for CPU, memory, disks, network and processes
catfishVersatile file searching software
ClonezillaPartition and disk cloning software
CPU-XSystem profiler with both a GUI and text-based
CzkawkaFind duplicate files, big files, empty files, similar images, and much more
ddrescueData recovery tool, retrieving data from failing drives as safely as possible
dustMore intuitive version of du written in Rust
f3Detect and fix counterfeit flash storage
Fail2banBan hosts that cause multiple authentication errors
fdupesFind or delete duplicate files
FirejailRestrict the running environment of untrusted applications
GlancesCross-platform system monitoring tool written in Python
GPartedResize, copy, and move partitions without data
GreenWithEnvyNVIDIA graphics card utility
gtopSystem monitoring dashboard
gWakeOnLANTurn machines on through Wake On LAN
hyperfineCommand-line benchmarking tool
HyFetchSystem information tool written in Python
inxiCommand-line system information tool that's a time-saver for everyone
journalctlQuery and display messages from the journal
kmonManage Linux kernel modules with this text-based tool
KrusaderAdvanced, twin-panel (commander-style) file manager
NmapNetwork security tool that builds a "map" of the network
nmonSystems administrator, tuner, and benchmark tool
nnnPortable terminal file manager that's amazingly frugal
petSimple command-line snippet manager
PingnooGraphical representation for traceroute and ping output
ps_memAccurate reporting of software's memory consumption
SMCMulti-featured system monitor written in Python
TimeshiftReliable system restore tool
QDirStatQt-based directory statistics
QJournalctlGraphical User Interface for systemd’s journalctl
TLPMust-have tool for anyone running Linux on a notebook
UnisonConsole and graphical file synchronization software
VeraCryptStrong disk encryption software
VentoyCreate bootable USB drive for ISO, WIM, IMG, VHD(x), EFI files
WTFPersonal information dashboard for your terminal
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our Comment FAQ before posting a comment.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments