ip Command in Linux: Complete Beginner Guide (2026 Edition)
Modern Linux networking relies heavily on the ip command β a powerful and flexible tool used to configure network interfaces, manage routing, and troubleshoot connectivity.
If you are still using ifconfig, itβs time to upgrade your skills.
π The ip command is now the industry standard and comes preinstalled on nearly all modern Linux distributions.
If you are unfamiliar with ifconfig, you may want to read our foundational guide first:
π https://bckinfo.com/understanding-the-ifconfig-command-line-on-linux/
This helps you understand why Linux transitioned to a more advanced networking tool.
In this guide, youβll learn:
- What the ip command is
- Why it replaced ifconfig
- Core commands every Linux user should know
- Practical examples
- Troubleshooting techniques
- Pro tips used by system administrators
Letβs dive in.
What Is the ip Command?
The ip command is part of the iproute2 package and is used to manage nearly every aspect of networking in Linux.
It allows you to control:
β
IP addresses
β
Network interfaces
β
Routing tables
β
ARP entries
β
Tunnels
β
Policy-based routing
Unlike older tools, the ip command consolidates networking functions into a single, consistent interface.
Why Did Linux Replace ifconfig?
Older utilities like ifconfig were powerful in their time but struggled to keep up with modern networking requirements.
The ip command offers:
- Better IPv6 support
- More advanced routing
- Improved performance
- Cleaner syntax
- Active maintenance
π In short: ip is built for modern infrastructure.
That said, knowing both tools makes you more versatile β especially when working with legacy servers.
Basic Syntax of the ip Command
ip [OPTIONS] OBJECT COMMAND
Where OBJECT can be:
- addr β IP addresses
- link β network interfaces
- route β routing tables
- neigh β ARP cache
Example:
ip addr show
Displays all IP addresses on your system.
Essential ip Commands Every Beginner Should Know
1. Show IP Addresses
ip addr show
Shortcut:
ip a
This reveals:
- IPv4 and IPv6 addresses
- Interface status
- Broadcast addresses
π One of the most frequently used Linux networking commands.
2. Show a Specific Interface
ip addr show eth0
Helpful when diagnosing a single interface.
3. Enable a Network Interface
sudo ip link set eth0 up
Equivalent to:
ifconfig eth0 up
But more modern and reliable.
4. Disable a Network Interface
sudo ip link set eth0 down
β οΈ Be careful when running this remotely β you might terminate your SSH session.
5. Assign an IP Address
sudo ip addr add 192.168.1.50/24 dev eth0
Remove it with:
sudo ip addr del 192.168.1.50/24 dev eth0
π Important:
Like ifconfig, these changes are usually temporary unless saved in your network configuration.
6. View Routing Table
ip route show
Shortcut:
ip r
Displays how traffic flows through your network β critical for troubleshooting gateway issues.
7. Add a Default Gateway
sudo ip route add default via 192.168.1.1
Used when configuring servers manually.
8. Check Neighbor (ARP) Table
ip neigh
Great for detecting IP conflicts or unreachable hosts.
ip vs ifconfig: Whatβs the Difference?
| Feature | ip command | ifconfig |
|---|---|---|
| Actively maintained | β Yes | β No |
| IPv6 support | β Excellent | β οΈ Limited |
| Advanced routing | β Yes | β No |
| Default on modern systems | β Yes | β Often missing |
π Bottom line:
Learn ip first. Know ifconfig for compatibility.
This combination is what most professional administrators use.
Pro Tips for Using the ip Command
Use Shortcuts
Linux professionals rarely type the full command.
Instead of:
ip addr show
They use:
ip a
Faster workflow = higher productivity.
Combine with grep for Cleaner Output
Example:
ip addr | grep inet
Perfect when you only need the IP address.
Understand Temporary vs Persistent Changes
The ip command modifies runtime settings.
For permanent configuration, use:
- Netplan (Ubuntu)
- NetworkManager
- nmcli
- systemd-networkd
Ignoring this is a common beginner mistake.
Common Troubleshooting Scenarios
No IP Address Assigned
Run:
ip a
If missing, request one via DHCP:
sudo dhclient
Cannot Reach Gateway
Check routes:
ip route
No default route? Add one manually.
Interface Shows DOWN
Enable it:
sudo ip link set eth0 up
Simple β but often overlooked.
When Should You Master the ip Command?
If you are aiming for roles such as:
- Linux Administrator
- DevOps Engineer
- Cloud Engineer
- Platform Engineer
π This command is not optional.
It is a daily tool in production environments.
Beginner Mistakes to Avoid
β Memorizing without understanding
Focus on what each object controls.
β Forgetting sudo
Most network changes require elevated privileges.
β Not verifying changes
Always confirm with:
ip a
Conclusion
The ip command is one of the most important tools in modern Linux networking.
While legacy utilities like ifconfig still appear in documentation and older environments, the future belongs to iproute2.
By mastering the ip command, you gain:
β
Better troubleshooting ability
β
Stronger infrastructure skills
β
Greater confidence managing servers
β
Career-ready Linux expertise
If youβre serious about Linux β start using ip today.
And for historical context or legacy environments, donβt forget to check our guide on ifconfig:
π https://bckinfo.com/understanding-the-ifconfig-command-line-on-linux/







