Last active
November 11, 2024 10:47
-
-
Save sghael/6cba5c75a36ed271fa959c35e516e516 to your computer and use it in GitHub Desktop.
Persistent WOL on Ubuntu 24.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Step-by-Step Guide | |
1. **Check for Active Connections:** | |
- Use `nmcli` to list active connections and identify the correct connection name: | |
```bash | |
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: | |
```bash | |
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: | |
```bash | |
sudo systemctl restart NetworkManager | |
``` | |
4. **Verify the Setting:** | |
- Confirm that the changes have been applied by checking the connection settings: | |
```bash | |
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