ip
networkingLinux
The ip command is one of the most frequently used commands in Linux/Unix-like operating systems. ip Show / manipulate routing, network devices, interfaces and tunnels
Quick Reference
Command Name:
ip
Category:
networking
Platform:
Linux
Basic Usage:
ip [options] [arguments]
Common Use Cases
Syntax
ip [options] object [command [arguments]]
Options
Option | Description |
---|---|
-V, -Version |
Print the version of ip utility and exit |
-s, -stats, -statistics |
Output more information. If the option appears twice or more, the amount of information increases |
-d, -details |
Output more detailed information |
-h, -human, -human-readable |
Output statistics with human-readable values followed by suffix |
-r, -resolve |
Use the system's resolver to print DNS names instead of IP addresses |
-f, -family |
Specify the protocol family: inet, inet6, bridge, mpls, link |
-4 |
Shortcut for -family inet |
-6 |
Shortcut for -family inet6 |
-B |
Shortcut for -family bridge |
-M |
Shortcut for -family mpls |
-0 |
Shortcut for -family link |
-o, -oneline |
Output each record on a single line, replacing line feeds with the '\' character |
-n, -netns |
Switch to the specified network namespace |
-a, -all |
Execute the command for all objects |
-c, -color |
Use color in output |
-t, -timestamp |
Display current time with each output line |
-b, -batch filename |
Read commands from a file or stdin and invoke them |
Examples
How to Use These Examples
The examples below show common ways to use the ip
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
ip address show