{"id":169,"date":"2020-04-14T08:39:58","date_gmt":"2020-04-14T00:39:58","guid":{"rendered":"http:\/\/wp.vicds.com\/?p=169"},"modified":"2026-01-06T16:09:50","modified_gmt":"2026-01-06T08:09:50","slug":"wol-linux-m","status":"publish","type":"post","link":"https:\/\/wp.vicds.com\/?p=169","title":{"rendered":"wol @linux @m$"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code># linux\nsudo apt-get install etherwake net-tools ethtool\n# check wol support\nethtool eth0  \u627e\u5230 Supports Wake-on \u770b\u770b\u6709\u6c92\u6709 g\n# remote wol\nsudo wakeonlan MAC:ADDRESS\n# or\nsudo etherwake -D MAC:ADDRESS\n\n# m$\n\u7528nirsoft\u7684wakemeonlan\n# \u5728m$\u67e5\u7db2\u5361\u6709\u6c92\u6709\u652f\u63f4 \u958b\u88dd\u7f6e\u7ba1\u7406\u54e1\u770b\u7db2\u5361 Advanced\u88e1\u6709\u6c92\u6709\u4e00\u500bWake on Magic Packet, \u6709\u7684\u8a71\u5c31\u628a\u5b83enabled<\/code><\/pre>\n\n\n\n<p>\u00a0\u5b89\u88dd\u4e86\u516c\u53f8\u4e00\u53f0\u6a5f\u5668\u5f8c\u624d\u767c\u73fe, \u9019\u500b\u529f\u80fd\u6709\u4e9b\u6642\u5019\u662f\u9700\u8981\u555f\u52d5\u7684@@<\/p>\n\n\n\n<p>\u53c3\u8003\u81ea <a href=\"https:\/\/wiki.debian.org\/WakeOnLan\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/wiki.debian.org\/WakeOnLan<\/a><\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\"># Enabling WOL\nifupdown\nAdd an interface config file \/etc\/network\/interfaces.d\/eth0 (or modify the global interface config file \/etc\/network\/interfaces):\n\nauto eth0\niface eth0 inet dhcp\n        ethernet-wol g\n\nActivate it:\nsudo reboot\n\n# systemd-networkd\nYou can check if your network is managed by systemd-networkd by networkctl list command.\n\nSet the WakeOnLan field to one of the available options in the [Link] section of the .link file for the network interfaces you want to use WOL on:\n\n\n[Link]\nWakeOnLan=magic\nBeware that only the first .link file is applied and that there is a 99-default.link. The name needs to be lexicographically smaller.\n\nActivate it:\nsudo networkctl reload\nsudo networkctl reconfigure\n\n# NetworkManager\nYou can check if your network devices are managed with nmcli d command.\n\nNetworkManager supports WOL since version 1.0.6 and you can enable it from either your desktop network configuration GUI, or the nm-connection-editor GUI from nm-connection-editor, or from the nmcli command-line tool using this command:\n\n\n$ sudo nmcli c modify &quot;wired1&quot; 802-3-ethernet.wake-on-lan magic\nManual\nThe ethtool command from the ethtool package can tell the network interface to respond to the magic packet. Replace eth0 with your network interface device name:\n\n\n$ sudo ethtool -s eth0 wol g<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0\u5b89\u88dd\u4e86\u516c\u53f8\u4e00\u53f0\u6a5f\u5668\u5f8c\u624d\u767c\u73fe, \u9019\u500b\u529f\u80fd\u6709\u4e9b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,11,3],"tags":[],"class_list":["post-169","post","type-post","status-publish","format-standard","hentry","category-linux","category-net","category-windows"],"_links":{"self":[{"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/posts\/169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=169"}],"version-history":[{"count":4,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":3486,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions\/3486"}],"wp:attachment":[{"href":"https:\/\/wp.vicds.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.vicds.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}