Wake on Lan settings on Ubuntu 20.04.1 LTS

The article I referred to did not suit my environment, so I wrote a memo for the future

1: BIOS settings ・ Enable WoL

2: OS settings ・ Install ethtool

$ sudo apt install ethtool

-Check the NIC name with ifconfig ・ Check the WoL status

$ sudo ethtool enp2s0 | grep Wake-on:
	Supports Wake-on: pumbg
	Wake-on: d

Wake-on: d if disabled

・ Activate

$ sudo ethtool -s enp2s0 wol g

·reconfirmation

$ sudo ethtool enp2s0 | grep Wake-on:
	Supports Wake-on: pumbg
	Wake-on: g

Wake-on: Confirm that it is g I enabled WoL with a command, but when I restart it, it returns to the original, so set automatic execution

3: Autorun setting

$ sudo sh -c "echo '#! /bin/sh
### BEGIN INIT INFO
# Provides:	wakeonlan
# Required-Start:
# Required-Stop:
# Should-Start:
# Default-Start:	2 3 4 5
# Default-Stop:
# Short-Description:	wakeonlan
### END INIT INFO
sudo ethtool -s enp2s0 wol g
exit' > /etc/init.d/wakeonlan"
sudo chmod +x /etc/init.d/wakeonlan
sudo update-rc.d wakeonlan defaults

・ Check if automation settings have been made

$ ls -l /etc/rc*.d/*wakeonlan
lrwxrwxrwx 1 root root 19 November 15 21:42 /etc/rc2.d/S01wakeonlan -> ../init.d/wakeonlan
lrwxrwxrwx 1 root root 19 November 15 21:42 /etc/rc3.d/S01wakeonlan -> ../init.d/wakeonlan
lrwxrwxrwx 1 root root 19 November 15 21:42 /etc/rc4.d/S01wakeonlan -> ../init.d/wakeonlan
lrwxrwxrwx 1 root root 19 November 15 21:42 /etc/rc5.d/S01wakeonlan -> ../init.d/wakeonlan

If you can do so far, restart and if you can confirm that it is Wake-on: g, it is completed For sending magic packets, use "Wake On LAN for Windows Ver3.01" from Windows. From iOS, use an app called "Wolow", details are omitted

Recommended Posts

Wake on Lan settings on Ubuntu 20.04.1 LTS
Apache2 on Ubuntu20.04 LTS
Building WebGIS on Ubuntu20.04 LTS
Record video on ubuntu18.04 LTS
Installing OpenMX on Ubuntu 18.04.5 LTS
Install raspi-config on Ubuntu 20.04 (LTS)
Install WordPress 5.5 on Ubuntu 20.04 LTS
NVIDIA-driver (GeForce RTX 2070 SUPER), cuda 10.0, cudnn 7.4.2 settings on Ubuntu 18.04.5 LTS (tensorflow-gpu: 2.0.0 version)
tmux on Ubuntu
Wine settings on Ubuntu 18.04 (install WOLF RPG Editor)
How to install multiple JDKs on Ubuntu 18.04 LTS
Web Bluetooth on Ubuntu20.04
Build Ubuntu 20.04 LTS desktop environment on Raspberry Pi 4 (+ Japanese)
Reinstall Kubernetes on Ubuntu 19.10
Use Flutter on Ubuntu
Install pyqt5 on ubuntu
Install Ruby on Ubuntu 20.04
Setting JAVA_HOME on Ubuntu
Install Autoware on Ubuntu 18.04.5
Put JetBrains on Ubuntu
Use mkdir on ubuntu
Use cpplapack on ubuntu
ubuntu on wsl part 10
Install Homebrew on Ubuntu 20.04
Run tiscamera on Ubuntu 18.04
Ubuntu 18.04.05 About LTS setup
Build Zabbix on Ubuntu 20.04
Install Ubuntu MATE 20.04 LTS on older MacBook Early 2008 (MB402 * / A, MB403 * / A, MB404 * / A)
How to Install Elixir and Phoenix Framework on Ubuntu 20.04 LTS
Pit pits when installing dotnet on Ubuntu 18.04 LTS + WINE + winetricks
Build mate desktop environment on ec2 with terraform (Ubuntu 20.04LTS)
How to install java9 on elementaryOS Freya or Ubuntu 14.04 LTS
Set up a MineCraft Paper server on Ubuntu 20.04.1 LTS ② Update
Use virtual AP on Ubuntu 18.04 LTS to sub-monitor old iPad
Using Flutter on Ubuntu (Part 2)
Create SSL certificate on Ubuntu 18.04
Install OpenJDK7 (JAVA) on ubuntu 14.04
Put Ubuntu 20.04.1 on Raspberry Pi 4
Install Cybozu Office 10 on Ubuntu 20.4
Extend swap area on Ubuntu 18.04
Install Docker on Ubuntu Server 20.04
Ubuntu on Windows Community Preview
Ubuntu (Mac style) initial settings
Japanese input on Ubuntu20.04 Desktop
Oracle Java 8 on Docker Ubuntu
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
Install Arudino IDE on Ubuntu 20
Introduced knowledge (wiki) on Ubuntu
Install Java on WSL Ubuntu 18.04
Ruby installation on WSL2 + Ubuntu 20.04
Install Ubuntu Desktop 20.10 on RaspberryPi4
Run chromium-mir-kiosk on Ubuntu Core
Install Arduino IDE on Ubuntu 20.04
Ubuntu on Windows build speed
Run java applet on ubuntu
Run Eclipse CDT on Ubuntu
Set up ansible-playbook on Ubuntu 20.04
Install PlantUML on Intellij on Ubuntu
Install Ubuntu Server 20.04 on Btrfs
Note: Install PostgreSQL 9.5 on Ubuntu 18.04