ip
TLDR
List interfaces with detailed info
$ ip address
List interfaces with brief network layer info$ ip -br address
List interfaces with brief link layer info$ ip -br link
Display the routing table$ ip route
Show neighbors (ARP table)$ ip neighbour
Make an interface up/down$ sudo ip link set [ethX] up
$ sudo ip link set [ethX] down
Add/Delete an IP address to an interface$ sudo ip address add [ip_address]/[mask] dev [ethX]
$ sudo ip address delete [ip_address]/[mask] dev [ethX]
Add a default route$ sudo ip route add default via [ip_address] dev [ethX]
SYNOPSIS
ip [-br] [-c] [-4|-6] object [command]
DESCRIPTION
ip is the modern Linux networking command for showing and manipulating routing, devices, policy routing, and tunnels. It replaces the older ifconfig, route, and arp commands.
PARAMETERS
address, a
Display and manage IP addresseslink, l
Display and manage network interfacesroute, r
Display and manage routing tableneighbour, n
Display and manage ARP/neighbor cachetunnel
Display and manage IP tunnelsmaddr
Display and manage multicast addressesrule
Display and manage routing policy database-br, -brief
Print output in brief format-c, -color
Use color output-4
IPv4 only-6
IPv6 only-s, -stats
Output more statistics-o, -oneline
Output each record on a single line
CAVEATS
Changes made with ip are not persistent across reboots. Use network configuration files or NetworkManager for persistent changes.
HISTORY
Part of the iproute2 package, introduced in Linux 2.2 as a replacement for the older net-tools package (ifconfig, route, arp).


