2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Linux でwake on lan

Posted at

Linuxで、wake-on-lanをしたい時、コマンドラインでタイプするか、MACアドレスを憶えられない時、シェルスクリプトで書いておけばよいです。

具体的に、何をやっているかと言うと、マジックパケットを待ち受けているNICに、そのMACアドレスを指定して、マジックパケットをLAN全体にブロードキャストすると、そのNICが反応し、電源を入れる、と言った按配です。

Ubuntu18.04では、事前にsudo apt install wakeonlanが必要です。

#シェルスクリプト具体例

wol-comp1.sh
#!/bin/bash
wakeonlan 00:17:42:c7:56:40
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?