Output modifiers (-br, -s, -c, -d, -h) go right after ip and only
affect how the result is printed, not which object is selected: ip -br a
and ip a -br are the same. -4/-6 narrow the output to one protocol
version — useful when an interface has both IPv4 and IPv6 and the extra
lines get in the way.
| Option |
What it does |
Example |
-br --brief |
Brief, compact output — one line per object. |
ip -br a |
-s --stats |
Show statistics — packet, byte and error counters. |
ip -s link show eth0 |
-4 |
Restrict the output to IPv4. |
ip -4 a |
-6 |
Restrict the output to IPv6. |
ip -6 a |
-c --color |
Colorize the output. |
ip -c a |
-o --oneline |
Print each record on a single line — convenient for parsing. |
ip -o a |
-d --details |
More details about the object. |
ip -d link show eth0 |
-h --human-readable |
Human-readable size numbers (KB/MB/GB). |
ip -h -s link show eth0 |
Nothing found. Try a shorter query.