Tool to create magic packets that does not require sudo for installation and execution.
First, configure wake-on-lan on the machine you want to wake up:
-
Make sure that wake-on-lan is enabled in the bios.
-
Install
ethtool
viasudo apt install ethtool
-
Enable wake-on-lan persistently. This requires you to copy the file
wol.service
of this repository to/etc/systemd/system/wol.service
and replace "eth0" inside of this file with the name of your network interface. You can obtain this name by runningip addr
. Enable the WOL service via
sudo systemctl daemon-reload
sudo systemctl enable wol
sudo systemctl start wol
Second, download the easywake script on the machine you want to use for waking up the first machine:
wget --no-check-certificate https://raw.githubusercontent.com/TimSchneider42/easywake/master/easywake
chmod a+x easywake
To wake your machine up, call
./easywake [MAC ADDRESS] [IP ADDRESS]
where you replace [MAC ADDRESS] and [IP ADDRESS] with the MAC address and IP address of the machine you want to wake up. You can obtain this information by running ip addr
. For example:
./easywake DE:AD:00:BE:EF:42 192.168.0.42
If you are like us and need to frequently easywake the same machine over and over again... Worry no more! Just for this case we created the wakemaboi
script. To obtain your copy of this limited edition bash script, run
wget --no-check-certificate https://raw.githubusercontent.com/TimSchneider42/easywake/master/mk-wakemaboi
chmod a+x mk-wakemaboi
Set your MAC and IP address by running
./mk-wakemaboi [MAC ADDRESS] [IP ADDRESS]
Now your machine can be woken up by simply running
./wakemaboi