wake on lan rocky linux
- User
wake on lan rocky linux
Assistant
To enable Wake-on-LAN (WoL) on Rocky Linux, follow these steps:
1. Check Hardware Support
sudo ethtool eth0 | grep -i wake-on- Replace
eth0with your interface (find withip a). - Look for
Supports Wake-on: <value>andWake-on: <value>. - Common supported flags:
g(MagicPacket),d(disabled).
2. Enable WoL Temporarily
sudo ethtool -s eth0 wol g- Sets WoL to respond to MagicPacket (
g).
3. Make WoL Persistent
Create a systemd service to apply settings at boot:
sudo nano /etc/systemd/system/wol.serviceAdd:
[Unit] Description=Enable Wake-on-LAN [Service] Type=oneshot ExecStart=/usr/sbin/ethtool -s eth0 wol g [Install] WantedBy=multi-user.target- Replace
eth0with your interface.
Enable the service:
sudo systemctl daemon-reload sudo systemctl enable wol.service4. Configure NetworkManager (if used)
Edit the connection profile:
sudo nmcli con modify "Your Connection Name" 802-3-ethernet.wake-on-lan magic- Replace
"Your Connection Name"(find withnmcli con show).
5. Disable Power Saving (if needed)
Check power save status:
sudo ethtool --show-eee eth0Disable if active:
sudo ethtool --set-eee eth0 eee off6. Test WoL
- Shut down the system:
sudo shutdown now - From another device on the same network:
(Installwakeonlan MAC_ADDRESSwakeonlanif needed:sudo dnf install wakeonlan)
7. Troubleshooting
- BIOS/UEFI: Ensure "Wake on LAN" is enabled in firmware settings.
- Router: Forward UDP port 9 to the target MAC if waking from WAN.
- Firewall: Allow UDP port 9 (if using a firewall on the target):
sudo firewall-cmd --add-port=9/udp --permanent sudo firewall-cmd --reload - Network Adapter: Some hardware requires driver-specific tweaks (e.g.,
e1000e).
Key Notes:
- MAC Address: Use the actual MAC of
eth0(fromip link show eth0). - Interface Name: Adjust
eth0to your interface (e.g.,enp2s0). - Persistent Setup: The
wol.serviceensures settings survive reboots.
After configuration, the Rocky Linux machine will wake when it receives a MagicPacket directed to its MAC address.
- Replace
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.