Show all WireGuard interfaces, peers, endpoints, and traffic
Build a paste-ready command, then review its compatibility and effects before running it.
read-onlyrequires privileges Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementswgwg must be installed and available on PATH.Elevated accessReview the exact scope before using an elevated account.
Version supportwg Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsinterface: wg0Representative successful output; values vary with the selected target and system state.
Known errorswg: command not foundwg is missing or is not available on PATH.Permission deniedThe current identity does not have the required access.
Verifysudo wg show allThe output matches the expected target and exits without an error.Rollback noteNo universal automatic rollback is available. Capture the current state and use the tool-specific recovery procedure before applying changes.
Command breakdown
01sudoPrivilege elevationRuns the following command with elevated privileges after authorization.
02wgCommandRuns the wg stage of this one-liner.
03showArgumentPasses show to wg.
04allArgumentPasses all to wg.
Example input
sudo wg show all
Example output
interface: wg0
public key: wN8…k2M=
listening port: 51820
peer: 8R1…aQ4=
endpoint: 198.51.100.20:51820
allowed ips: 10.20.0.2/32
latest handshake: 32 seconds ago
transfer: 18.4 MiB received, 7.1 MiB sent
Illustrative output — exact values vary by system and data.
Official sources
Related commands