准备阶段

  1. 确认BIOS中已开启支持网络唤醒
    Bios中查找一下条目
  • Automatic Power On
  • Wake on LAN/WLAN
  • Power Management
  • Power On by Onboard LAN
  1. 确认Windows下适配器开启魔术包唤醒

Win + R 打开运行 ncpa.cpl
右键打开属性 > 配置 > 电源管理 确认一下条目被勾选

  • 允许计算机关闭此设备以节约电源
  • 允许此设备唤醒计算机
  • 只允许幻数据包唤醒计算机

唤醒配置

在其它设备上(路由器或Linux设备)

确保安装了etherwake

安装命令

# debian or ubuntu
apt install etherwake

# centos or rehel
yum install etherwake
# 或
dnf install etherwake

# 常见路由器
opkg update
opkg install wol etherwake

执行( 后面MAC地址填需要唤醒主机网卡 )

/usr/bin/etherwake B4:2E:99:FA:0E:61

定时唤醒

编辑自启文件

# 赋予执行权限
sudo chmod +x /etc/rc.d/rc.local

# 编辑文件
sudo vi /etc/rc.d/rc.local

表示每天AM 07:40执行唤醒任务

40 07 * * * /usr/bin/etherwake -i br-lan B4:2E:99:FA:0E:61
最后修改:2023 年 10 月 17 日
如果觉得我的文章对你有用,请随意赞赏