Tools & Commands · Linux and Windows Commands
ip
Addressing · Intermediate
The modern Linux utility for showing and changing addresses, links, and the forwarding table. Common forms ask for addresses or for routes.
It replaces several older commands. Ask it for addresses when you want the interface list, and ask it for the forwarding table when you want to see the gateway.
Example: ip addr shows interface addresses, and ip route shows which gateway is used for other networks.
Command
Platform: Linux
ip addr
Each numbered interface can have a state, a hardware address, and one or more protocol addresses with a prefix length such as /24.
2: eth0: <BROADCAST,UP,LOWER_UP>
inet 192.0.2.10/24 brd 192.0.2.255 scope global eth0Interface eth0 is up. 192.0.2.10/24 is its address and prefix. The word scope global means it is not limited to the host itself.
Common misconception
- The bare command is not a protocol. It is a Linux administration utility with many subcommands.