Wakes up one or more hosts that are connected to a network in suspend mode by sending a Magic Packet.
To send a Magic Packet to a subnet-directed broadcast address:
wol { [-m MACAddress [ [ -h Host -s SubnetMask ] | -i Interface ] | -f File } [ -v ]
To send a Magic Packet to a multicast address:
wol { -m MACAddress -M MulticastAddress [ -p Port ] [ -i Interface ] | -f File} [ -v ]
The wol command wakes up one or more hosts that are connected to a network in suspend mode by sending a Magic Packet to the specified address or addresses on the specified subnet.
The file specified with -f File contains the list of hosts which need to be awakened. This file consists of one or more lines, each line containing the following information in this format:
MacAddress; Hostname/IPaddress; SubnetMask; Multicast; Port; Interface
00:20:35:7a:7:89a; 9.41.86.19; 255.255.255.0 ; ; ;
00:04:ac:17:c0:9f ; obiwan.aoot.austin.ibm.com; 255.255.255. 224; ; ;
00:07:be:4a:2:394; ; ; ; ; en0
00:06:38:6b:7e:8f ; ; ; 234.5.6.7; 12345 ;
A
line starting with a "#" character is a comment and is ignored. Each
line contains 6 tokens separated by ";" character. The MAC address
is mandatory. The other tokens are optional, but the ";" character
must be used to separate unused tokens.Item | Description |
---|---|
-i Interface | Specifies the interface to use on the host where the wol command is being run |
-f File | Specifies the name of a file containing a group list. This allows the user to wake a specified group of hosts. |
-h Host | Specifies a host to wake, either as a hostname or as an IPv4 address in dot string representation (for example, 10.0.0.3). |
-m MACAddress | Specifies the a 48 bits MAC address of the host in hex representation (for example, 00:20:35:7a:78:9a). |
-M MulticastAddress | Specifies an IPv4 multicast address. |
-p Port | Specifies the port to use on the multicast machine. |
-s SubnetMask | Specifies an IPv4 subnet mask in dot string representation (for example, 255.255.255.0). |
-v | Specifies verbose mode. |
Item | Description |
---|---|
0 | The command completed successfully. |
>0 | An error occurred. |
/usr/sbin/wol