I installed Ubuntu just today to run WireGuard

I then followed their installation instructions for Ubuntu.

$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard-dkms wireguard-tools

Unfortunately their 'Quick start' has been anything, but...

$ ip link add dev wg0 type wireguard
RNETLINK answers: Operation not supported 

Freaking STOCK Ubuntu and STOCK WireGuard and I'm getting problems already. This is why I was staying away from Linux in the first place. Yet here I am, posting questions on a troubleshooting forum within hours.

I checked headers, checked updates, etc. No dice.


I face the same problem.... but I fix that by luck when I tried to install it with source compile in Wireguard website. I run the following and it is resolved:

$sudo apt-get install libmnl-dev libelf-dev linux-headers-$(uname -r) build-essential pkg-config
  • 1
    Thanks. This solved the issue in my case. So, the overall process was: sudo add-apt-repository ppa:wireguard/wireguard sudo apt-get update sudo apt-get install wireguard sudo apt-get install libmnl-dev libelf-dev linux-headers-$(uname -r) build-essential pkg-config – SommerEngineering Jul 6 '19 at 17:11

Just reboot, that should have fixed your problem.

But still: Wireguard although it works fine for me is still in beta and not meant for daily use. From the developers website at wireguard.com:

Warning: WireGuard is currently under development, and therefore any installation steps here should be considered as experimental. We are rapidly working toward mainline inclusion, at which point we will consider this codebase non-experimental.

  • 1
    Nope. Does not work on current KDE Neon which has Ubuntu 18.04 as base. – nerdoc Nov 21 '18 at 10:10
  • Yup, this did the trick for me on Ubuntu 18.04. While this worked initially, at some point it became necessary to reboot before starting the service. Does anyone have a link to the upstream bug report? – colan Jul 15 '20 at 2:35

Most probably the wireguard kernel module is not loaded. Just try a modprobe wireguard. If this shows an error, the problem is that the module did not compile correctly for your kernel. This, most probably, is because wireguard is still not completely "stable".

If this is the case, just wait for an update of wireguard, in case of such an error this should be the case within a few days, as the wireguard devs seem to fix these kind of problems very fast.


I did a few things. I'm not sure whether individual or a combination of them helped.

  • disable secure boot
  • reboot my laptop (Ubuntu 17.10)

One thing that is worth mentioning: after those actions, I ran commands to setup WireGuard successfully with sudo. Previously, I couldn't.


With 18.04 bionic the wireguard dkms module wasn't built with a version of a 4.15.x kernel + headers for me (it was though in the past?). When upgrading to the recently available "hardware enablement" 4.18 kernel the module was successfully built (see output of dpkg-reconfigure wireguard or dkms status wireguard).

Check for necessary desktop/server package(s) installs in the ubuntu wiki.


Fixed this issue by upgrading kernel to 4.15.0-128-generic

lsmod | grep wireguard gives output

wireguard             221184  0
ip6_udp_tunnel         16384  1 wireguard
udp_tunnel             16384  1 wireguard

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.