Either some (preferably free/OS) app or a command line tool will do.
(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:
The scripts takes 2 arguments, the MAC address of the NIC, and an IP address.
For example, I have a Synology NAS manually configured with the IP address of
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:
(Naturally, substitute the actual values of your device and network for your situation.)
You can get more information from the wakeonlan man page,