Notice: the remote wakeup is not only about wake-up within the LAN, but even over the Internet.
1. Check whether the computer hardware supports the wol (Wake on LAN) function. 1. Check whether the motherboard and power supply support wol
Enter the power management setup of bios and set PME event wake up (which is actually a wake on PCI Card mode) to enabled. Note that some machines may be wake on LAN or wake on PCI Card. The wake on LAN mode can be used to wake up when the system is completely shut down, while the wake on PCI Card mode must be used to wake up in the deep sleep mode. The main reason for this difference is that the design of the motherboard is different. The current computers are generally in the wake on PCI Card mode.
. Check whether the NIC supports Wol.
Install ethtool and run the following command:
sudo apt-get install ethtoolsudo ethtool eth0 |grep Wake-on
If the result is as follows, the NIC supports Wol:
Supports Wake-on:pumbgWake-on : g
2. remotely control the computer to enter the deep sleep or completely shut down state
SSH is used to connect to a remote computer and command requests are submitted to achieve this goal.
. Use the Ubuntu terminal to log on to a remote computer
For more information, see connect to a remote computer on the Ubuntu terminal.
2. After logging on to a remote computer, run the following command to perform deep sleep or shutdown:
# Deep Sleep sudo pm-hibernate # shutdown sudo shutdown 0
3. Wake up remote computer 3. 1. Preparations
. Wake up a remote computer
Run the following command to wake up a remote computer:
# Host_address is the domain name or IP address of the remote computer, mac_address is the MAC address of the remote computer, and the MAC address is ':' in the form of interval wakeonlan-I host_address mac_address