WoL.sh is a simple Wake-on-LAN shell script.
- Download
- Compatibility
- Before Use
- Syntax
- Examples
- Why WoL.sh?
- What is Wake-on-LAN or Wake-on-WLAN?
- Licence
- Download the latest version of WoL.sh (0.1) or browse older versions.
- DISCLAIMER: WoL.sh is currently at pre-release stage - users should exercise caution.
WoL.sh should (but is not guaranteed to) work on most Mac or Linux systems. The author is using this utility on a macOS 10.15.3 system to wake up a Windows 10 PC, both on Wi-Fi.
Like any shell script, you must first make WoL.sh executable. This can be done by running in terminal (assuming WoL.sh is located at ~/Desktop/WoL.sh
):
chmod u+x ~/Desktop/WoL.sh
WoL.sh [MAC] [IP] [Port]
MAC
: mandatory, MAC address of the target machineIP
: recommeded, the magic packet will be sent to this IP, default: 255.255.255.255 (broadcast to all IPs)Port
: optional, the magic packet will be sent to this port, default: 9
~/Desktop/WoL.sh 0F:1E:2D:3C:4B:5A 192.168.1.100
In this example:
- WoL.sh is located at
~/Desktop/WoL.sh
. - The target computer's MAC address is
0F:1E:2D:3C:4B:5A
. - This command will send a magic packet to
192.168.1.100
at port9
(usual port for magic packets).
~/Desktop/WoL.sh 0F:1E:2D:3C:4B:5A 192.168.1.100 9000
In this example:
- WoL.sh is located at
~/Desktop/WoL.sh
. - The target computer's MAC address is
0F:1E:2D:3C:4B:5A
. - This command will send a magic packet to
192.168.1.100
at port9000
. It is usually unnecessary to specify the port unless port 9 of the target is blocked (e.g. by a firewall).
~/Desktop/WoL.sh 0F:1E:2D:3C:4B:5A
In this example:
- WoL.sh is located at
~/Desktop/WoL.sh
. - The target computer's MAC address is
0F:1E:2D:3C:4B:5A
. - This command will broadcast a magic packet to all systems at port
9
. - This command has not been tested.
WoL.sh does not require installation. Most authors on the web recommend dedicated programs to perform Wake-on-LAN. A common example is "wakeonlan" for Macs. These programs are well-tested and probably contain more features than WoL.sh. But there are many scenarios where installing a program is inappropriate or not allowed (e.g. on a company machine) or there may be concerns over installing new software.
A computer can be configured to wake from sleep when it receieves a special network message known as a "Magic Packet". This technique is known as "Wake-on-LAN" (for a computer using a wired connection) or "Wake-on-WLAN" (for a computer using a wireless connection). Read more on https://en.wikipedia.org/wiki/Wake-on-LAN
WoL.sh is distributed under the MIT License.
MIT License
Copyright (c) 2020 Steve's Toolkit
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.