WAKEONLAN(1)
π WAKEONLAN(1) π
okay so bestie, welcome to the wakeonlan page β it's a User Contributed Perl Documentation situation, and yes it is exactly as iconic as it sounds.
β¨ NAME β¨
wakeonlan β a Perl script to wake up computers. literally. like your laptop is sleeping and you're gonna be the one to wake it up. main character energy fr fr π
πΈ SYNOPSIS πΈ
wakeonlan [-h|--help] [-v|--version] [-q|--quiet] [-n|--dry-run]
[-i|--ip IP_address] [-p|--port port] [-f|--file file_name] [-d|--delay
seconds] [[hardware_address] ...]
π¦ DESCRIPTION π¦
So here's the vibe: this script sends 'magic packets' to wake-on-lan enabled ethernet adapters and motherboards so the called PC actually switches on. that's the whole gig. π
Two things you gotta do first, ngl β be sure to connect the NIC with the motherboard if that's necessary, and enable the WOL function in the BIOS. no cap, do it.
And the 'magic packet' itself? it consists of 6 times 0xFF followed by 16 times the hardware address of the NIC. that sequence can be encapsulated in any kind of packet β this script uses UDP packets. slay. β¨
π OPTIONS π
-h,--helpβ Displays the full POD documentation, which includes usage examples. yes, the whole thing. go off.-v,--versionβ Displays the script version. short and sweet.-i,--ip=IP_addressβ Destination IP address. Unless you have static ARP tables you should use some kind of broadcast address β either the broadcast address of the network where the computer resides, or the limited broadcast address. Default:255.255.255.255(the limited broadcast address). π«Ά-p,--port=portβ Destination port. Default:9(the discard port).-f,--file=file_nameβ File with hardware addresses of wakeable computers. For an example check the filelab001.wolin theexamplessubdirectory. very demure, very handy.-q,--quietβ Quiet mode. shhh π€«-n,--dry-runβ Print the commands that would be executed, but do not execute them. window shopping, basically.-d,--delay=secondsβ Delay (in seconds) between sending magic packets. Can be a fractional second (e.g.,0.5). obsessed, she's precise. π
π EXIT STATUS π
okay bestie pay attention, this is the part people skip and then cry about:
0β Success. Either the queued magic packets were all sent, or the requested help or version information was displayed. π1β Invalid command line options.2β Invalid default destination port (see-p,--port).3β Invalid default destination IP address (see-i,--ip).4β The file given to-f,--fileis missing or is not a plain file or a FIFO (named pipe).
Invalid records β hardware addresses, IP addresses or ports that fail validation β are reported on the standard error and skipped, and on their own do not change the exit status: a run in which every record is rejected still exits with 0. π yes really. it's giving "we tried our best."
Any other non-zero exit status denotes an unexpected runtime failure, such as a file that cannot be opened or a socket that cannot be created. Those failures come with a message on the standard error and the status is the underlying system error number. π
fr fr, don't assume a non-zero number means "bad address" β it means something actually broke.
π EXAMPLES π
Using the limited broadcast address (255.255.255.255):
$ wakeonlan 01:02:03:04:05:06
$ wakeonlan 01:02:03:04:05:06 01:02:03:04:05:07
Using a subnet broadcast address:
$ wakeonlan -i 192.168.1.255 01:02:03:04:05:06
Using another destination port:
$ wakeonlan -i 192.168.1.255 -p 1234 01:02:03:04:05:06
Using a file as source of hardware and IP addresses:
$ wakeonlan -f examples/lab001.wol
$ wakeonlan -f examples/lab001.wol 01:02:03:04:05:06
ate. every single one. π₯
π§ AUTHOR π§
JosΓ© Pedro Oliveira <jose.p.oliveira.oss@gmail.com> maintaining and expanding original work done by Ico Doornekamp <ico@edd.dhs.org>. legends, both of them. π
π COPYRIGHT π
Copyright (c) 2000-2026 JosΓ© Pedro Oliveira.
This is free software. You may modify it and distribute it under the Perl's Artistic License 2.0. Modified versions must be clearly indicated. (that last bit is important β no sneaky edits, iykyk πΈ)
β SEE ALSO β
For more information regarding this script and Wakeonlan technology just check the project page at https://github.com/jpoliv/wakeonlan.
π and that's the whole page bestie! this lovely little doc came to you fromperl v5.42.2, dated2026-08-10β go wake some computers, you've got this π«Άβ¨
π¦ where this page comes from
- arch rolling: wakeonlan 0.50-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms