What Is the ip Command in Linux?¶
Introduction¶
The ip command shows and configures network addresses, links, and routes. It is useful for beginners, Linux administrators, DevOps engineers, and RHCSA students because it solves practical terminal tasks.
What the Command Does¶
Use ip to work with the specific Linux object it manages. Before changing anything, identify the target and run a read-only check when possible.
Basic Syntax¶
ip OBJECT COMMAND
The syntax includes the command, any options, and the target object.
Common Options¶
addr: show or manage IP addresses.link: show or manage interfaces.route: show or manage routes.
Practical Examples¶
ip addr show
ip link show
ip route show
sudo ip addr add 192.0.2.10/24 dev eth0
Verification command:
ip -br addr
Example output:
lo UNKNOWN 127.0.0.1/8 ::1/128
eth0 UP 192.0.2.10/24 fe80::1/64
When to Use This Command¶
Use ip to inspect live network state and make temporary network changes. Persistent configuration is usually handled by NetworkManager tools on RHEL-style systems.
Common Mistakes¶
- Expecting temporary
ipchanges to survive reboot. - Changing a remote interface without console or out-of-band access.
- Mixing up addresses, links, and routes when troubleshooting.
Quick Reference¶
ip addr show
ip link show
ip -br addr
Related Guides¶
Summary¶
The ip command is safest when you understand the target, choose the right option, and verify the result with a separate command.