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.

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements None
Est. reading time N/A

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 http://in.archive.ubuntu.com/ubuntu/ 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

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum