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
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: wakeonlan 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
Sending magic packet to 255.255.255.255:9 with 00:08:9b:c4:30:30
To use a subnet broadcast address:
$ wakeonlan -i 192.168.1.255 00:08:9b:c4:30:30
You can use another destination port:
$ wakeonlan -i 192.168.1.255 -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
- HowTo: Wake Up Computers Using Linux Command [ Wake-on-LAN ( WOL ) ]
- FreeBSD: Wake Up Servers Using Wake-on-LAN ( WOL ) Command