# How do I use WireGuard on Linux?

> How to use WireGuard on Linux as a client in 5 steps: install wireguard, place the .conf in /etc/wireguard, wg-quick up and down, start at boot.

- URL: https://tunnelvps.com/guides/how-to-use-wireguard-on-linux/
- Last updated: 2026-11-16
- Publisher: TunnelVPS (https://tunnelvps.com)

The same tools as on the server, used the other way round: a client file in /etc/wireguard, wg-quick to bring it up, and systemd if it should start at boot.

**Quick answer — How do I use WireGuard on Linux?**

Here is how to use WireGuard on Linux: install the `wireguard` package, copy the laptop's client file from the **TunnelVPS** server to `/etc/wireguard/wg0.conf`, then run `sudo wg-quick up wg0`. Stop it with `sudo wg-quick down wg0`. To start it at every boot, enable `wg-quick@wg0` with systemd. That is 5 steps.

**In brief**

- **Install**: `sudo apt install wireguard` on Ubuntu, `apt install wireguard` as root on Debian.
- **File**: `/etc/wireguard/<name>.conf`; the file name becomes the interface name.
- **Use**: `wg-quick up` and `wg-quick down`, as root.
- **At boot**: `systemctl enable --now wg-quick@<name>`.

## What are the steps on a Linux laptop?

*WireGuard client on Linux against a TunnelVPS server, 5 steps, from wireguard.com and wg-quick(8)*

| Step | Where | What to do |
| --- | --- | --- |
| 1 | TunnelVPS server | Add a `[Peer]` for the laptop and write its client file. |
| 2 | Laptop terminal | Install the `wireguard` package with apt. |
| 3 | Laptop terminal | Copy the client file with `scp` into `/etc/wireguard/wg0.conf`. |
| 4 | Laptop terminal | Run `sudo wg-quick up wg0`, then `sudo wg show`. |
| 5 | Laptop terminal | Optional: `sudo systemctl enable --now wg-quick@wg0` to start at boot. |

## Which package does a Linux client need?

**The same `wireguard` package as the server, from the distribution's own repository.** TunnelVPS read wireguard.com on 16 November 2026: Ubuntu uses `sudo apt install wireguard`, and Debian uses `apt install wireguard` as root. Other distributions are listed on the same page.

The package brings `wg` and `wg-quick`, the two tools behind how to use WireGuard on Linux. The tunnel itself runs in the Linux kernel. Outline and AmneziaVPN also have Linux apps, if a network blocks WireGuard.

## Where does the client file go?

**In `/etc/wireguard/`, named after the interface you want, such as `wg0.conf`.** The wg-quick manual says it searches `/etc/wireguard/INTERFACE.conf` first when given a name. A file called `london.conf` gives an interface called `london`.

Copy the file from the server with `scp`, then tighten its permissions. It holds the laptop's private key. The [add a device guide](https://tunnelvps.com/guides/how-to-add-a-device-to-a-wireguard-server/ "How do I add a device to WireGuard?") shows how the server side creates it.

*Install, copy the file and bring the tunnel up*

```bash
sudo apt install wireguard
scp root@203.0.113.10:/etc/wireguard/clients/laptop.conf /tmp/wg0.conf
sudo install -m 600 /tmp/wg0.conf /etc/wireguard/wg0.conf
rm /tmp/wg0.conf
sudo wg-quick up wg0
sudo wg show
```

## How do you turn the tunnel on and off?

**`wg-quick up` brings it up and `wg-quick down` takes it down, both as root.** The manual lists four actions: up, down, save and strip. While up, `wg show` prints the latest handshake and the bytes sent and received.

To keep it on across reboots, enable the systemd unit `wg-quick@wg0`. Disable it again with `systemctl disable --now wg-quick@wg0`. That covers how to use WireGuard on Linux day to day.

*Daily use and start at boot*

```bash
sudo wg-quick down wg0
sudo wg-quick up wg0
sudo systemctl enable --now wg-quick@wg0
sudo systemctl disable --now wg-quick@wg0
```

## What happens to DNS and routes on Linux?

**wg-quick sets the `DNS =` resolver through `resolvconf` and adds routes for `AllowedIPs`.** With `0.0.0.0/0` or `::/0`, the manual says it uses policy routing rules to override the default route. If `resolvconf` is missing, the `DNS =` line fails; install a package that provides it.

The [DNS leak guide](https://tunnelvps.com/guides/how-to-check-a-vpn-for-dns-leaks/ "How do I check a VPN for DNS leaks?") shows how to confirm lookups go through the tunnel. To send only some traffic through, see the [split tunneling guide](https://tunnelvps.com/guides/how-to-split-tunnel-with-wireguard/ "How do I set up WireGuard split tunneling?").

## Can one Linux laptop hold several tunnels?

**Yes: one file per tunnel, each with its own interface name.** For example `ny.conf` and `frankfurt.conf` for two TunnelVPS servers. Bring up one full tunnel at a time; two default routes conflict.

The [device guides hub](https://tunnelvps.com/guides/ "Which WireGuard setup guide fits my device?") covers the other systems in the house. Every plan has the same price in all six cities, so a second server in another city costs the same as the first.

## Linux client questions

### Is there a graphical way to use WireGuard on Linux?

Some desktops can import WireGuard files into their network settings. The command line works the same on every distribution.

### Does WireGuard on Linux need root?

Bringing an interface up or down needs root, so run `wg-quick` with `sudo`.

### What is the best way to use WireGuard on Linux in 2026?

The distribution's `wireguard` package with `wg-quick`, and the systemd unit for a tunnel that should always be on.

### How do I check the tunnel is working?

Run `sudo wg show`. A recent latest handshake and growing transfer counters mean it works.

### Can the Linux laptop also use Outline or AmneziaWG?

Yes. Outline and AmneziaVPN both publish Linux apps that connect to the same TunnelVPS server.

**Verdict**

- **`wg-quick up` and `down`** are all most Linux users need day to day.
- **The systemd unit** keeps an always-on tunnel across reboots.

## Sources

1. [WireGuard: Installation](https://www.wireguard.com/install/) — WireGuard (read 2026-11-16)
2. [wg-quick(8) manual page](https://man7.org/linux/man-pages/man8/wg-quick.8.html) — man7.org (read 2026-11-16)
3. [wg(8) manual page](https://man7.org/linux/man-pages/man8/wg.8.html) — man7.org (read 2026-11-16)
4. [Outline: get started](https://getoutline.org/get-started/) — Outline Foundation (read 2026-11-16)

**Get the server first** Home covers every laptop and phone in a household, at $6.37 a month on 12 months. [Order Home for 12 months](https://tunnelvps.com/app/checkout/?plan=home&term=12m&image=ubuntu-24.04&from=guides-how-to-use-wireguard-on-linux&lang=en) · [All device guides](https://tunnelvps.com/guides/ "How do I connect each device to my own VPN server?")

---

TunnelVPS: TunnelVPS rents Linux KVM servers for a personal VPN (WireGuard, Outline or AmneziaWG) in New York, Dallas, Los Angeles, London, Amsterdam and Frankfurt, paid in crypto with no ID document. 5 plans from 2 to 16 GB of RAM and 2 to 6 TB of traffic a month cost the same in all six cities; on the 12-month term each is priced at least 25% under a named comparable plan of a no-KYC crypto host, read on 16 November 2026. The operator is DomaineGoat LLC, Panama.
