Skip to content

Instantly share code, notes, and snippets.

@andrewssobral
Last active August 5, 2021 17:02
Show Gist options
  • Save andrewssobral/451aededa4182e4491f70959027731b5 to your computer and use it in GitHub Desktop.
Save andrewssobral/451aededa4182e4491f70959027731b5 to your computer and use it in GitHub Desktop.
wakeonlan
# https://doc.ubuntu-fr.org/wakeonlan
# check if your target pc is wake-on-lan enabled:
sudo ethtool enp8s0 | egrep "^[[:blank:]]*Wake-on: (g|d)"
# you should have:
# Wake-on: g
# get target pc mac address
ifconfig enp8s0
# Suspend (or hibernate) your target pc
sudo systemctl suspend
or
sudo systemctl hibernate
# list network mac addresses from the host pc
arp -a
# from the host pc type to wake-up the target pc:
wakeonlan $MAC_ADDRESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment