original: https://gist.github.com/sghael/6cba5c75a36ed271fa959c35e516e516
-
Check for Active Connections:
- Use
nmcli
to list active connections and identify the correct connection name:nmcli connection show
- Use
-
Edit the Connection Profile via nmcli:
-
If you cannot find the
.nmconnection
file directly in/etc/NetworkManager/system-connections/
, you can usenmcli
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 thenmcli connection show
command.
-
-
Apply Changes:
- After modifying the connection, restart NetworkManager to apply the changes:
sudo systemctl restart NetworkManager
- After modifying the connection, restart NetworkManager to apply the changes:
-
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.