This is what I do on all my linux boxes:
cat /etc/systemd/system/enableWol.service
[Unit]
Description=Enable WOL
After=multi-user.target

[Service]
ExecStart=/usr/sbin/ethtool -s enp1s0 wol g

[Install]
WantedBy=multi-user.target

########################

Then you have to: sudo systemctl enable enableWol; sudo systemctl start
enableWol

Some machines use eth0 or other device names.
It works reliably.

I wrote a script listing all the MAC addresses for all machines to wake
them up with:
sudo etherwake -i eth0 aa:bb:cc:zz:yy:xx
- note some distros are using ether-wake.

After some time - I got even more lazy and created WOL button for every
host in my home assistant. Now I mostly press the appropriate home
assistant WOL button on my cell phone. Pretty sad!

Best luck, Tomas

On Sat, Nov 1, 2025 at 2:41 PM Russell Senior <[email protected]> wrote:

> Dear lazyweb (as they say on the anti-social media),
>
> As hard as this is to believe, I only recently started playing with
> wake-on-lan. A few of my home lab computers don't need to run all the
> time, and so I have discovered that I can just "systemctl suspend" them
> and then, later, send them a wake-on-lan packet and have them spring
> back to life without the annoying exercise associated with walking down
> some stairs to physically interact with them.
>
> One remaining annoyance is that some of the computers or, perhaps,
> network cards boot up in the wrong wake-on-lan mode and I have to
> reconfigure wake-on-lan with "ethtool". I don't want to have to remember
> that every time, so I'm looking for some convenient systemd method for
> running the ethtool command line every time it boots.
>
> Anyone happen to have a favorite method, off hand?
>
> These are mostly ubuntu boxes of some permutation or another.
>
> Thanks!
>
>
> --
> Russell Senior
> [email protected]
>

Reply via email to