Skip to content

Instantly share code, notes, and snippets.

@aont
Forked from sghael/gist:6cba5c75a36ed271fa959c35e516e516
Last active November 11, 2024 10:48
Show Gist options
  • Save aont/13ed2b9cef5c889342dfe2c16be9fdae to your computer and use it in GitHub Desktop.
Save aont/13ed2b9cef5c889342dfe2c16be9fdae to your computer and use it in GitHub Desktop.
Persistent WOL on Ubuntu 24.04

original: https://gist.github.com/sghael/6cba5c75a36ed271fa959c35e516e516

Persistent WOL on Ubuntu 24.04 Step-by-Step Guide

  1. Check for Active Connections:

    • Use nmcli to list active connections and identify the correct connection name:
      nmcli connection show
  2. Edit the Connection Profile via nmcli:

    • If you cannot find the .nmconnection file directly in /etc/NetworkManager/system-connections/, you can use nmcli to modify the connection settings:

      sudo nmcli connection modify "your-connection-name" 802-3-ethernet.wake-on-lan magic
    • Replace "your-connection-name" with the actual name of your connection as listed by the nmcli connection show command.

  3. Apply Changes:

    • After modifying the connection, restart NetworkManager to apply the changes:
      sudo systemctl restart NetworkManager
  4. Verify the Setting:

    • Confirm that the changes have been applied by checking the connection settings:

      nmcli connection show "your-connection-name" | grep 802-3-ethernet.wake-on-lan
    • You should see the setting 802-3-ethernet.wake-on-lan: magic if it has been applied successfully.

By using nmcli, you can manage network connections directly through the command line without needing to manually edit configuration files. This approach ensures that your settings are correctly applied even if the configuration files are not easily accessible or do not exist as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment