在 Ubuntu 中设置远程唤醒功能,通常涉及两个主要步骤:确保硬件支持远程唤醒(WOL),并在操作系统层面配置相应的设置。以下是详细的步骤和注意事项:
ethtool
:sudo apt-get install ethtool
sudo ethtool enp5s0
Supports Wake-on: g
,则表示网卡支持 WOL。sudo nano /etc/systemd/system/wol.service
[Unit]
Description=Wake on LAN service
[Service]
Type=simple
ExecStart=/sbin/ethtool -s <your_network_interface> wol g
<your_network_interface>
替换为你的网卡名称。sudo systemctl enable wol
sudo systemctl start wol
sudo nano /etc/systemd/sleep.conf
[Sleep]
SuspendState=mem
PowerSave=off
wakeonlan -i <your_network_interface> <mac_address>
<your_network_interface>
替换为你的网卡名称,<mac_address>
替换为被唤醒设备的 MAC 地址。通过以上步骤,你可以在 Ubuntu 系统中设置远程唤醒功能。请确保在操作过程中注意安全,避免未经授权的访问。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:如何在ubuntu中启用远程协助