Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Either some (preferably free/OS) app or a command line tool will do.

share|improve this question
up vote 3 down vote accepted

Try WakeOnLan or wol — both are open source, both are available through MacPorts (and possibly through Homebrew as well).

share|improve this answer
1  
the wakeonlan link above is dead; this tool works great: readpixel.com/wakeonlan – Art Jul 16 '14 at 3:56
2  
Alternatively, you can simply install Homebrew and use homebrew install wakeonlan from Terminal. – Rampant Jul 31 '15 at 17:16

install:

mkdir -p $HOME/bin

curl https://raw.githubusercontent.com/jpoliv/wakeonlan/master/wakeonlan -o ~/bin/wakeonlan
chmod +x ~/bin/wakeonlan

wake:

~/bin/wakeonlan THE_MAC_ADDRESS
share|improve this answer
    
Could you expand your answer to explain what these commands do? – Burgi Feb 25 at 14:50
    
mkdir: make ad new directory; curl: Download "wakeonlan"; ~/bin/wakeonlan: execute the downloaded script. – B.Bippus Feb 27 at 15:22

Install the wakeonlan package using Homebrew:

$ brew install wakeonlan

(It's a Perl script for waking up computers via Wake-On-LAN magic packets.)

When installed, you can send a "magic packet" from your Terminal to any device using its IP (Internet Protocol) and MAC (Media Access Control) address.

Here's an example of a typical use:

$ wakeonlan -i 192.168.1.255 -p 1234 01:02:03:04:05:06

The scripts takes 2 arguments, the MAC address of the NIC, and an IP address.

Note: The IP address argument is tricky and isn't what you'd think.

For a NIC on your local subnet, use the broadcast-address of this subnet. (e.g. subnet 192.168.10.0 with netmask 255.255.255.0, use 192.168.10.255)

For example, I have a Synology NAS manually configured with the IP address of 10.0.1.100 with a subnet mask of 255.255.255.0 and a router address of 10.0.1.1.

The correct IP address to use is not that of the device, but instead the broadcast-address of the subnet.

Continuing on my example, I used the following command to successfully wake up my Synology:

$ wakeonlan -i 10.0.1.255 -p 7 01:02:03:04:05:06

(Naturally, substitute the actual values of your device and network for your situation.)

You can get more information from the wakeonlan man page, man makeonlan, or a quick glossary of commands from wakeonlan -h.

share|improve this answer

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.