ip Command in Linux: Complete Beginner Guide (2026 Edition)

Linux_OS

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?

Featureip commandifconfig
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/

(Visited 2 times, 2 visits today)

You may also like