GO KALI FREE
Networking Commands

ip Linux Command

Modern replacement for ifconfig. Shows and manipulates routing, devices, and tunnels.

What does ip do?

Modern replacement for ifconfig. Shows and manipulates routing, devices, and tunnels.

Syntax

ip [options] object command

Practical example

ip addr show

Questions about ip

How do I show all IP addresses?

Use `ip addr show` or `ip a` to display all network interfaces and their IP addresses. Use `ip -4 a` for IPv4 only.

How do I show the routing table?

Use `ip route show` or `ip r` to display the kernel routing table. This shows default gateway and network routes.

How do I show network interfaces?

Use `ip link show` or `ip l` to list all network interfaces with their state (up/down) and MAC addresses.

How do I assign an IP address with ip?

Use `sudo ip addr add 192.168.1.100/24 dev eth0` to add an IP address to an interface. Use `ip addr del` to remove it.

How do I bring an interface up or down?

Use `sudo ip link set eth0 up` to enable, or `sudo ip link set eth0 down` to disable a network interface.

How do I add a default gateway?

Use `sudo ip route add default via 192.168.1.1` to set the default gateway. Use `ip route del` to remove a route.

How do I show neighbor (ARP) table?

Use `ip neigh show` to display the ARP table (IP-to-MAC address mappings), replacing the old `arp` command.

How do I show interface statistics?

Use `ip -s link show` to display packet counts, errors, and other statistics for each network interface.

Related Networking Commands

ifconfig

Displays or configures network interface parameters (deprecated, use ip).

netstat

Displays network connections, routing tables, interface statistics, and more.

ping

Sends ICMP echo request packets to test network connectivity to a host.

ss

Modern replacement for netstat. Dumps socket statistics quickly.

nmap

Network exploration tool and port scanner (basic usage).

curl

Transfers data from or to a server using various protocols (HTTP, FTP, etc.).