Ubuntu22.04远程网络唤醒 Linux

mowen 2024-10-22 5

vim /etc/systemd//system/wol@.service
[Unit]
Description=Wake-on-LAN for %i
Requires=network.target
After=network.target
[Service]
ExecStart=/sbin/ethtool -s %i wol g
Type=oneshot
[Install]
WantedBy=multi-user.target
ip a|grep -i UP
查看需要WOL的网卡名称xxx
sudo systemctl daemon-reload
sudo systemctl enable wol@xxx.service
sudo systemctl start wol@xxx.service
查看xxx的WOL状态
ethtool xxx|grep -i wake


最新回复 (0)
返回
发新帖
X