1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/wg.md

25 lines
537 B
Markdown
Raw Normal View History

2021-02-12 13:28:04 +02:00
# wg
> Manage the configuration of WireGuard interfaces.
> More information: <https://www.wireguard.com/quickstart/>.
- Check status of currently active interfaces:
2023-07-31 05:40:18 +03:00
`sudo wg`
2021-02-12 13:28:04 +02:00
- Generate a new private key:
2021-02-12 13:28:04 +02:00
`wg genkey`
- Generate a public key from a private key:
2021-02-12 13:28:04 +02:00
`wg pubkey < {{path/to/private_key}} > {{path/to/public_key}}`
2021-02-12 13:28:04 +02:00
- 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:
2023-07-31 05:40:18 +03:00
`sudo wg showconf {{wg0}}`