DEV Community

Cover image for Enable Wake On LAN on Debian
Mohammad Zakery
Mohammad Zakery

Posted on

Enable Wake On LAN on Debian

Wake On Lan on Debian

WOL Debian


1.Install ethtool :



sudo apt install ethtool


Enter fullscreen mode Exit fullscreen mode

2.Checking the Interface :



ip a


Enter fullscreen mode Exit fullscreen mode

3.Select the interface you want to use. For Example :



enp3s0


Enter fullscreen mode Exit fullscreen mode

4.Turn wake on lan On Temporarily :



sudo ethtool --change enp3s0 wol g


Enter fullscreen mode Exit fullscreen mode

5.Check the WOL status of the interface with the following command :



sudo ethtool enp3s0


Enter fullscreen mode Exit fullscreen mode

6.find the bellow section :



Wake-on: g


Enter fullscreen mode Exit fullscreen mode

Making wake on lan Permanent

7.find ethtool directory :



which ethtool


Enter fullscreen mode Exit fullscreen mode

in my os : /usr/sbin/ethtool

8.Create wol.service in /etc/systemd/system/ with the following content.



[Unit]
Description=Enable Wake On Lan

[Service]
Type=oneshot
ExecStart = /usr/sbin/ethtool --change enp3s0 wol g

[Install]
WantedBy=basic.target


Enter fullscreen mode Exit fullscreen mode

9.Enable The Service :



sudo systemctl daemon-reload
sudo systemctl enable wol.service


Enter fullscreen mode Exit fullscreen mode

Top comments (0)