WakeOnLAN from Linux / Bash command line

by James McDonald | Jun 21, 2026 | IT Tips | 0 comments

The following sends a magic packet to the subnet broadcast address and wakes up the computer with MAC= MAC Address

MAC=80:bc:de:f0:0a:b9

echo -e $(echo $(printf 'f%.0s' {1..12}; printf "$(echo $MAC | sed 's/://g')%.0s" {1..16}) | sed -e 's/../\\x&/g') | nc -w1 -u -b 192.168.0.255 9


0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.