1.下載wol的rpm包
下載地址 https://pkgs.org/download/wol
2.選擇需要下載的rpm
這裏下載的centos8
的rpm
安裝包
wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/w/wol-0.7.1-23.el8.x86_64.rpm
3.安裝wol
rpm -Uvh wol-0.7.1-23.el8.x86_64.rpm
4.檢查是否安裝
wol
出現如下指令代表安裝成功
[root@localhost first]# wol
wol: Too few arguments.
Try `wol --help' for more information.
[root@localhost first]#
5.根據MAC喚醒主機
wol FF:D8:FF:0E:EG:FF
其它:使用centos自帶的工具遠程關閉window
net rpc shutdown -I 192.168.0.109 address -U <username>%<password>