snippetbashTip
wg — Manage the configuration of WireGuard interfaces. More information: <https://www.wireguard.com/quick
Viewed 0 times
theconfigurationcommandwireguardclimanagewginterfaces
linux
Problem
How to use the
wg command: Manage the configuration of WireGuard interfaces. More information: <https://www.wireguard.com/quickstart/>.Solution
wg — Manage the configuration of WireGuard interfaces. More information: <https://www.wireguard.com/quickstart/>.Check status of currently active interfaces:
sudo wgGenerate a new private key:
wg genkeyGenerate 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}}Code Snippets
Check status of currently active interfaces
sudo wgGenerate a new private key
wg genkeyGenerate 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}}Context
tldr-pages: linux/wg
Revisions (0)
No revisions yet.