以前ご紹介した gWakeOnLan
ですが、Xubuntu 20.04 LTS へ切替時にうまく導入できませんでした。
Lubuntu 16.04 LTS、Lubuntu 18.04 LTS で使っていたので、馴染みがあり残念です。
今回は、代わりに CUI ツール Etherwake
を使うことにしました。
インストールしてから 1ヶ月以上経ちましたが、問題なく使えています。
Etherwake
概要
etherwakeは、MagicPacket(マジックパケット)を送信するプログラムです。
*MagicPacket は、Wake-On-LAN(WOL)対応の NIC(ネットワークカード)にパケットを送ることで PC 電源 を ON するために使用します。
導入
Xubuntu 20.04 LTS 標準リポジトリには、wakeonlan
、etherwake
の 2つの WOL ユーティリティが登録されています。
$ apt-cache search etherwake
wakeonlan - wake-on-LAN が有効なイーサネットアダプタに 'マジックパケット' を送信
etherwake - tool to send magic Wake-on-LAN packets
今回は etherwake
を導入します。
$ sudo apt install etherwake -y
使用法
基本的には、引数に MACアドレスを付けるだけで OK です。
$ sudo etherwake MA:CA:DD:RE:SS:00
*sudo を付けないと etherwake: This program must be run as root.
と怒られます。
ネットワーク名が eth0
でない場合は、オプションで指定します。
例えば、ネットワーク名が enp1s0
の場合は、以下のようになります。
sudo etherwake -i enp1s0 MA:CA:DD:RE:SS:00
etherwake(8) — etherwake — Debian bullseye — Debian Manpages
OPTIONS
- b
Send the wake-up packet to the broadcast address.- D
Increase the Debug Level.- i ifname
Use interface ifname instead of the default "eth0".- p passwd
Append a four or six byte password to the packet. Only a few adapters need or support this. A six byte password may be specified in Ethernet hex format (00:22:44:66:88:aa) or four byte dotted decimal (192.168.1.1) format. A four byte password must use the dotted decimal format.- V
Show the program version information.