Show Linux network interfaces and addresses
Build a paste-ready command, then review its compatibility and effects before running it.
read-onlyno known side effects Compatibility
LinuxUse ifconfig on macOS.
Operational knowledgereview due 2027-01-19
Requirementsipip must be installed and available on PATH.
Version supportip Current supported releasesVerified for linux, macos using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalslo UNKNOWN 127.0.0.1/8 ::1/128Representative successful output; values vary with the selected target and system state.
Known errorsip: command not foundip is missing or is not available on PATH.
Verifyip -brief addressThe output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01ipCommandRuns the ip stage of this one-liner.
02-briefOptionConfigures ip with the -brief option.
03addressArgumentPasses address to ip.
Example input
ip -brief address
Example output
lo UNKNOWN 127.0.0.1/8 ::1/128
eth0 UP 192.168.1.42/24 fe80::a00:27ff:fe4e:66a1/64
wg0 UNKNOWN 10.8.0.2/24
Illustrative output — exact values vary by system and data.
Official sources