DEV Community

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

Posted on

29

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

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay