![]() To do this, issue the command: sudo nano /etc/systemd/system/wol.service To make this persistent on Ubuntu Server 18.04, you must write a systemd file. The problem with this method is that the enabling of WOL on the interface will not stick after a reboot. The command will report that it has sent the magic packet to the MAC address and your remote server should now be awake, allowing you to log in remotely. Where MAC is the MAC address of the LAN interface with WOL enabled. Once that application is installed, you can then send the magic packet to the listening interface with the command: wakeonlan MAC Install this with the command: sudo apt-get install wakeonlan -y The easiest way to send the magic packet (from Linux to Linux) is by using another tool, called wakeonlan. How to install WOL and send the magic packet This can be discovered with the same command used to find the interface name (ip a). The command will report nothing back–unless it turns out your network interface doesn't support WOL, at which point it will inform you as such.įinally, you must know the MAC address of the interface. ![]() Where INTERFACE is the name of the interface to be used. With the interface name in hand, issue the command: sudo ethtool -s INTERFACE wol g Look for the name associated with IP address you want to be listening for the magic packet ( Figure A).įigure A My LAN-facing interface is ens5. To find the interface name, issue the command: ip a If your machine has both WAN and LAN interfaces, you'll probably only want to enable this on the LAN side. The next thing you need to do is locate the interface name you want listening for the magic packet. Open a terminal window and issue the following command: sudo apt-get install ethtool -y How to locate the interface name However, on the off-chance it's not, let's install it. Chances are, it's already installed on your server. The tool that makes this possible is ethtool. The only things you'll need to make this work are:
0 Comments
Leave a Reply. |