LinuxCommandLibrary

wol

Wake computers using Wake-on-LAN

TLDR

Send a WoL packet to a device

$ wol [mac_address]
copy

Send a WoL packet to a device in another subnet based on its IP
$ wol --ipaddr=[ip_address] [mac_address]
copy

Send a WoL packet to a device in another subnet based on its hostname
$ wol --host=[hostname] [mac_address]
copy

Send a WoL packet to a specific port on a host
$ wol --port=[port_number] [mac_address]
copy

Read hardware addresses, IP addresses/hostnames, optional ports and SecureON passwords from a file
$ wol --file=[path/to/file]
copy

Turn on verbose output
$ wol [[-v|--verbose]] [mac_address]
copy

SYNOPSIS

wol [ -i <ip_address> ] mac_address

PARAMETERS

mac_address
    The MAC address of the target computer, in the format XX:XX:XX:XX:XX:XX or XX-XX-XX-XX-XX-XX.

-i <ip_address>
    The IP address to send the packet to. Default is the broadcast address (255.255.255.255).

DESCRIPTION

The wol command is a simple utility used to send Wake-on-LAN (WoL) "magic packets" to wake up computers that are in a power-saving state. It constructs and transmits a specifically formatted Ethernet frame that contains the target machine's MAC address repeated several times.

When a network interface card (NIC) configured for WoL receives this magic packet, it signals the computer's motherboard to power on. This allows administrators and users to remotely power on machines without physical access.

The wol command simplifies the process of generating and sending these packets, requiring only the target MAC address as input. It is commonly used in network management, remote administration, and home automation scenarios.

CAVEATS

WoL requires that the target computer's NIC and BIOS are configured to support Wake-on-LAN. The computer must be connected to a network, and its power supply must provide standby power to the NIC. Network configuration, such as routers and firewalls, might need to be adjusted to forward broadcast packets or allow WoL packets to reach the target machine. Some machines might not support WoL at all.

EXAMPLES

wol 00:11:22:33:44:55: Sends a WoL packet to the computer with MAC address 00:11:22:33:44:55 using the default broadcast address.
wol -i 192.168.1.255 00:11:22:33:44:55: Sends a WoL packet to the computer with MAC address 00:11:22:33:44:55 using the broadcast address 192.168.1.255.

SEE ALSO

etherwake(8)

Copied to clipboard