mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
30 lines
629 B
Plaintext
30 lines
629 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, linux]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# wg
|
|
|
|
> Manage the configuration of WireGuard interfaces.
|
|
> More information: <https://www.wireguard.com/quickstart/>.
|
|
|
|
- Check status of currently active interfaces:
|
|
|
|
`sudo wg`
|
|
|
|
- Generate a new private key:
|
|
|
|
`wg genkey`
|
|
|
|
- Generate a public key from a private key:
|
|
|
|
`wg < {{path/to/private_key}} pubkey > {{path/to/public_key}}`
|
|
|
|
- Generate a public and private key:
|
|
|
|
`wg genkey | tee {{path/to/private_key}} | wg pubkey > {{path/to/public_key}}`
|
|
|
|
- Show the current configuration of a wireguard interface:
|
|
|
|
`sudo wg showconf {{wg0}}`
|