How to Wake Other Computers from macOS?
Most of the users use multiple devices at home or office for different needs. Each device will have different purposes and data according to their usage. Most of the users use remote desktop services to use all of the devices on a single device. However, if the device is turned off or in sleep mode, it will require a user or a method to wake it up. In this article, we will talk about how a user can wake other computers from their macOS.
Installing Homebrew and Wake on LAN through Homebrew
Most of the packages are installed through the package managers. If you don’t have homebrew (package manager) already installed on your macOS, then you need to install it. You can install Wake on Lan through homebrew. We are going to merge the steps of installing homebrew and Wake on Lan in this method. However, if you already have the homebrew or other package manager installed then skip installing the homebrew in the below steps.
Note: Skip the first 4 steps, if you already have homebrew installed on your macOS.
- Hold Command key and press Space to open Spotlight. Type Terminal and press the Enter key to open it.
- Before installing homebrew, the Xcode command-line tool is necessary to install by the following command:
xcode-select --install
- Now type or copy the following command to install Homebrew on your macOS:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- During the installation, it will ask for a Return (Enter) key and password for confirmation of the administrator. Then the installation will be successfully completed.
- Now to install Wake on Lan, type the following command:
brew install wakeonlan
- It will take some time and install the Wake on Lan on your macOS.
Waking Up Other Computer through WOL
In order to power on a computer, a magic packet is sent to that computer. The magic packet that is sent through Wake on Lan is a specially designed frame for waking up computers. The magic packet is a broadcast frame, which means it will be sent to each and every device in that network. However, it contains the mac address of the specific device, so every device is going to receive it but only the target device is going to use it. In this method, we will be sending a magic packet through Wake on Lan application that we just installed on our macOS in the above method.
Most of the computers will have the Wake on Lan feature turned off by default. You need to check and turn on the Wake on Lan on your PC. This can be enabled in the system’s settings or in the BIOS of the system. Most operating systems do not support the Wake on Lan when the system is in the hybrid shutdown state. However, the firmware and hardware on some systems may support the Network Interface Cards (NICs) for waking the system from shutdown state. You can also check, if the magic packet is received by the PC or not by using the Wireshark network protocol analyzer.
If everything seems good, then type the following command to Wake the system:
wakeonlan -I 192.168.1.255 -p 1234 01:02:03:04:05:06
The IP address in the above command is not that of the device, but instead the broadcast address. (e.g. subnet 192.168.10.0 with netmask 255.255.255.0, then use 192.168.10.255). The parameters in command, -i is for the broadcast address, -p sets the destination port, and the third parameter is MAC address.