Install Wireguard on Debian 11

First update package list and upgrade your operating system:

sudo apt update && sudo apt upgrade

To install Wireguard use command:

sudo apt install wireguard

Now check if Wireguard installed correct:

sudo modprobe wireguard

If this command dose not show anything, Wireguard installed correct. If You get error like this: modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.19.0-12-686, install this package:

sudo apt install linux-headers-$(uname --kernel-release)