Forrest logo
tool overview
On this page you find all important commands for the CLI tool wg. If the command you are looking for is missing please ask our AI.

wg

The command line tool "wg" refers to the WireGuard utility. WireGuard is a modern and fast VPN protocol for creating secure network connections. The "wg" command line tool is used for managing and configuring WireGuard tunnels on various operating systems. It allows users to create, delete, modify, and monitor WireGuard interfaces. The tool provides a simple and straightforward command structure with various subcommands and options. Users can generate and manage key pairs, configure IP addresses and routing tables, and set up firewall rules using the "wg" command line tool. The utility also provides functionalities to view the current status of WireGuard interfaces, such as displaying statistics and information about peers connected to the tunnel. Overall, the "wg" command line tool is an essential component for managing WireGuard VPN connections from the command line interface.

List of commands for wg:

  • wg:tldr:0b702 wg: Generate a new private key.
    $ wg genkey
    try on your machine
    explain this command
  • wg:tldr:798ba wg: Show the current configuration of a wireguard interface.
    $ wg showconf ${wg0}
    try on your machine
    explain this command
  • wg:tldr:a9b38 wg: Generate a public key from a private key.
    $ wg pubkey < ${path-to-private_key} > ${path-to-public_key}
    try on your machine
    explain this command
  • wg:tldr:aba62 wg: Generate a public and private key.
    $ wg genkey | tee ${path-to-private_key} | wg pubkey > ${path-to-public_key}
    try on your machine
    explain this command
  • wg:tldr:d876b wg: Check status of currently active interfaces.
    $ wg
    try on your machine
    explain this command
tool overview