停电后小电脑有时候无法自动开机,实验了一下远程开机
一、确认网卡设置
[root@lab5101 ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes:
10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 2
Transceiver: internal
Auto-negotiation: onMDI-X: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
drv probe linkLink detected: yes
注意标红的两行,wake-on如果是d表明网络唤醒是禁用,将它改成g
可以进bios改,也可以使用命令修改:
ethtool -s eth0 wol g # eth0是网卡名,可通过ifconfig查看实际名称。
记录网卡的mac地址
二、在另一台电脑运行唤醒命令
使用etherwake命令,如果没有可使用apt安装
sudo etherwake -i enp1s0 68:1d:xx:2b:ad:xx
enp1s0为网卡名称,后面是mac地址