I have been searching for a way to Wake-on-LAN (WoL) multiple clients in a computer lab or for the purpose of disk imaging. I am using Lubuntu 12.04 as the server. What is the simplest and/or best command-line tool(s) for this job?
Asked
Active
Viewed 2,096 times
1 Answers
3
I have been doing quite a bit of research and trial/error work on this subject and I'd like to share my findings. These three pages have been very helpful: Wake-on-LAN and Beginners/BashScripting and List all MAC addresses in my local network.
- I used arp to gather the MAC addresses I needed as they were powered on and connected to my isolated LAN.
- I tested etherwake and wakeonlan and examined their options; wakeonlan allowed me to reference a file to get multiple MAC addresses to wake but would not wake my HP6455b laptops, while etherwake would wake my laptops but not allow me to wake more than one at a time.
- I created a simple bash script to wake all of the computers I needed with a single command.
#!/bin/bash etherwake 00:00:00:00:00:00 etherwake 00:00:00:00:00:00 ..
I saved this as a .sh file, gave it permission to run with chmod a+x and then ran it as root: presto!

HarlemSquirrel
- 3,741
-
Is it really needed to run it as root? – CijcoSistems Aug 02 '14 at 02:06
-
It only worked for me with with sudo or root account. – HarlemSquirrel Aug 03 '14 at 04:31