Network

The ip command

Inspects and configures the network: addresses, routes and interfaces.

Syntax

ip [addr|route|link]

Most useful options

addrAddresses of your interfaces
routeRouting table
linkState of the interfaces

Copy-ready examples

$ ip addrSee your IP addresses
$ ip routeSee your gateway

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • 127.0.0.1 is your own machine; the network IP is usually 192.168.x.x.

Related commands

FAQ

ip or ifconfig?

ip is the modern standard; ifconfig is the classic, now deprecated.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course