Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
linux:linux-tutorials:enable-wol-persistent [2024/02/07 15:53] Zyzonixlinux:linux-tutorials:enable-wol-persistent [2024/02/07 16:05] (current) – [Enable automatically at boot] Zyzonix
Line 86: Line 86:
  
 ==== Enable automatically at boot ==== ==== Enable automatically at boot ====
 +
 +If not enabled in BIOS WoL has to be enabled before shutting down. This can be done by a system service:
 +
 +Firstly create the service file:
 +<code bash>sudo nano /etc/systemd/system/wol-enable.service</code>
 +And add this content: 
 +<code bash>
 +[Unit]
 +Description=Configure Wake-up on LAN
 +After=network-online.target
 +
 +[Service]
 +Type=oneshot
 +ExecStart=/sbin/ethtool -s <interface> wol g
 +
 +[Install]
 +WantedBy=basic.target
 +</code>
 +Remind to change the ''<interface>''.
 +
 +Then save the file and enable the service with:
 +<code bash>sudo systemctl enable wol-enable.service</code>
  
 // Sourced from [[https://wiki.ubuntuusers.de/Wake_on_LAN/|wiki.ubuntuusers.de]]// // Sourced from [[https://wiki.ubuntuusers.de/Wake_on_LAN/|wiki.ubuntuusers.de]]//
  • linux/linux-tutorials/enable-wol-persistent.txt
  • Last modified: 2024/02/07 16:05
  • by Zyzonix