Activating Wake-on-LAN for a Linux Mint Machine
Wake-on-LAN (WoL) is a network standard that allows a computer to be turned on or awakened from a low-power state remotely. This can be particularly useful in situations where you need to access a machine that is not physically close to you, or if you want to be able to power on a machine without having to physically interact with it.
Prerequisites
To use Wake-on-LAN on a Linux Mint machine, you will need the following:
- A network interface card (NIC) that supports Wake-on-LAN
- The ability to access the BIOS or UEFI settings on your machine
- The ability to run commands on the Linux Mint machine
Checking NIC Support for Wake-on-LAN
To check if your NIC supports Wake-on-LAN, you can use the ethtool command. This command is typically included in the default installation of Linux Mint. To use it, open a terminal and enter the following command:
sudo ethtool Replace eth0 or enp0s3. The output of the command will include a line that looks like this:
Supports Wake-on: pumbgThe letters in this line indicate which Wake-on-LAN options are supported. The p indicates that the NIC supports Wake-on-Pattern Match, which is the most commonly used Wake-on-LAN method. The u indicates that the NIC supports Wake-on-Magic Packet, which is another common Wake-on-LAN method. The b indicates that the NIC supports Wake-on-LAN when the system is in a low-power state, and the g indicates that the NIC supports Wake-on-LAN when the system is in a suspend or hibernate state.
Enabling Wake-on-LAN in the BIOS or UEFI Settings
To enable Wake-on-LAN in the BIOS or UEFI settings, you will need to restart your machine and enter the BIOS or UEFI setup menu. This is typically done by pressing a certain key (such as F2, F10, or DEL) during the boot process. Once you are in the BIOS or UEFI setup menu, look for a setting called something like "Wake-on-LAN" or "Power On by PCI-E". Enable this setting and save your changes. Then, restart your machine.
Enabling Wake-on-LAN in Linux Mint
To enable Wake-on-LAN in Linux Mint, you will need to run a few commands. First, open a terminal and enter the following command:
sudo ethtool -s wol pumbg Replace /etc/network/interfaces file to make the Wake-on-LAN settings persistent across reboots. You can use a text editor such as nano or vim to do this. Add the following line to the file:
pre-up ethtool -s wol pumbg Again, replace ethtool command to enable Wake-on-LAN every time the network interface is brought up. Save the file and exit the text editor. Then, restart your machine to apply the changes.
Testing Wake-on-LAN
To test Wake-on-LAN, you will need to have another machine on the same network as the Linux Mint machine. There are many Wake-on-LAN tools available for different platforms, but one of the simplest is the wakeonlan command, which is available in the repositories for many Linux distributions. To install it, open a terminal and enter the following command:
sudo apt-get install wakeonlanOnce the command is installed, you can use it to send the Wake-on-LAN "magic packet" to the Linux Mint machine. The syntax of the command is as follows:
wakeonlan Replace
Wake-on-LAN is a useful feature that allows you to remotely power on a Linux Mint machine. To use it, you will need a NIC that supports Wake-on-LAN, and you will need to enable Wake-on-LAN in the BIOS or UEFI settings and in Linux Mint. You can test Wake-on-LAN using the wakeonlan command or another Wake-on-LAN tool.