跳轉到

Commands

Frequent Commands

Generate new private key

$ wg genkey

Generate new public key

$ wg pubkey

then paste the private key and input Ctrl+D

Manage wireguard daemon

via systemd.

# use config /etc/wireguard/wg0.conf
$ sudo systemctl enable --now wg-quick@wg0
$ sudo systemctl disable --now wg-quick@wg0
$ sudo systemctl restart wg-quick@wg0

Check running status

$ wg