1.安装wakeonlan
(base) ➜ ~ brew install wakeonlan
Updating Homebrew...
==> Downloading https://ghcr.io/v2/homebrew/core/wakeonlan/manifests/0.41
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/wakeonlan/blobs/sha256:017f70ad
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Pouring wakeonlan--0.41.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/wakeonlan/0.41: 6 files, 18.8KB
2.唤醒NAS命令
(base) ➜ ~ wakeonlan 00:11:22:33:43:d2
Sending magic packet to 255.255.255.255:9 with 00:11:22:33:43:d2
3.可以看到服务器已经起来了
使用wireshark抓到的wol报文
NAS中需要先配置好wol:
参考:
https://www.cyberciti.biz/faq/apple-os-x-wake-on-lancommand-line-utility/