Show WireGuard receive and transmit counters for every peer
Build a paste-ready command, then review its compatibility and effects before running it.
sudo wg show all transferread-onlyrequires privileges Compatibility
Byte countersThe last two columns are received and transmitted bytes for each peer.
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 signalswg0 8R1m3z7pQ2x4kL9sV6nB0cD5eF1gH8jK4aQ= 19293742 7428810Representative 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 all transferThe 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.
05transferArgumentPasses transfer to wg.
Example input
sudo wg show all transfer
Example output
wg0 8R1m3z7pQ2x4kL9sV6nB0cD5eF1gH8jK4aQ= 19293742 7428810
wg0 4G9p2mN7bV1cX5zL8kJ3hF6dS0aQ9wE2rT= 0 0
Illustrative output — exact values vary by system and data.
Official sources
Related commands