UnixDroid

Network · Linux command

ip command in Linux

What does ip do?

ip shows and changes network settings. ip a lists interfaces and IP addresses; ip r shows the routing table.

ip [object] [command]

Most useful options

OptionWhat it does
aaddresses
rroutes (default gateway)
linkinterfaces
nneighbours (ARP table)

ip examples

$ ip a Try it ›

your IP addresses

$ ip r Try it ›

your default gateway

In security work

ip a and ip r are the first two commands when troubleshooting any network problem.

Questions about ip

How do I find my IP address in Linux?

ip a (or the older ifconfig). Look at the inet line of eth0 / wlan0.