LinuxCommandLibrary

wakeonlan

TLDR

Wake computer

$ wakeonlan [00:11:22:33:44:55]
copy
Wake with broadcast address
$ wakeonlan -i [192.168.1.255] [00:11:22:33:44:55]
copy
Wake on specific port
$ wakeonlan -p [9] [00:11:22:33:44:55]
copy
Wake from file
$ wakeonlan -f [hosts.txt]
copy
Verbose output
$ wakeonlan -v [00:11:22:33:44:55]
copy

SYNOPSIS

wakeonlan [-i address] [-p port] [-f file] [options] mac

DESCRIPTION

wakeonlan sends Wake-on-LAN magic packets. It powers on remote computers.
Magic packets contain the target MAC. Repeated 16 times in specific format.
Broadcast address reaches sleeping hosts. Local network or directed broadcast.
Port 9 is standard. Some systems use port 7.
File input enables multiple hosts. One MAC per line.

PARAMETERS

-i ADDRESS

Broadcast address.
-p PORT
UDP port (default 9).
-f FILE
Read MACs from file.
-v
Verbose output.

REQUIREMENTS

- Target NIC supports WoL
- WoL enabled in BIOS/UEFI
- WoL enabled in OS
- Computer connected to network

CAVEATS

Only works on local network (unless forwarded). BIOS settings required. Some NICs need driver config.

HISTORY

Wake-on-LAN was developed by AMD and HP in 1996. wakeonlan provides command-line access to this power management feature.

SEE ALSO

Copied to clipboard