Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

  1. I used arp to gather the MAC addresses I needed as they were powered on and connected to my isolated LAN.
  2. 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.
  3. 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!

share|improve this answer
    
Is it really needed to run it as root? –  CijcoSistems Aug 2 at 2:06
    
It only worked for me with with sudo or root account. –  HarlemSquirrel Aug 3 at 4:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.