Ubuntu Linux: Install Wake On Lan Client For Server

How do I install wake on lan client under Ubuntu Linux desktop to wakeup Unix or Linux based servers?

You need to install wakeonlan perl script to wake up computers or servers. This utility sends magic packets to wake-on-lan enabled Ethernet adapters and motherboards. You need to use this to turn on the PC or server. Please note that this will only work if the NIC with the motherboard enabled with the WOL function in the BIOS.

Ubuntu wake on lan client installation

Open a terminal and type the following command:
$ sudo apt-get install wakeonlan
Sample outputs:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.4 kB of archives.
After this operation, 73.7 kB of additional disk space will be used.
Get:1 precise/main wakeonlan all 0.41-10 [11.4 kB]
Fetched 11.4 kB in 0s (24.8 kB/s)    
Selecting previously unselected package wakeonlan.
(Reading database ... 193608 files and directories currently installed.)
Unpacking wakeonlan (from .../wakeonlan_0.41-10_all.deb) ...
Processing triggers for man-db ...
Setting up wakeonlan (0.41-10) ...

How do I use wakeonlan client?

The syntax is

wakeonlan server-mac-address-here
wakeonlan [options] server-mac-address-here


Type the following command to wakeup a nas server called nas01 with 00:08:9b:c4:30:30 as mac address, enter:
$ wakeonlan 00:08:9b:c4:30:30
Sample outputs:

Sending magic packet to with 00:08:9b:c4:30:30

To use a subnet broadcast address:
$ wakeonlan -i 00:08:9b:c4:30:30
You can use another destination port:
$ wakeonlan -i -p 2345 00:08:9b:c4:30:30
Finally, you can use a file as source of hardware and IP addresses:
$ wakeonlan -f ~$HOME/.admin-data/racks/dc05.floor03.wol

See also

Posted by: SXI ADMIN

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.


How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....

How to Start and Enable Firewalld on CentOS 7

In this article, we discuss how to start and enable firewalld. It is highly recommended that you have a firewall protecting your server.Pre-Flight CheckThese...