Network
The ip command
Inspects and configures the network: addresses, routes and interfaces.
Syntax
ip [addr|route|link]Most useful options
addrAddresses of your interfacesrouteRouting tablelinkState of the interfacesCopy-ready examples
$ ip addrSee your IP addresses$ ip routeSee your gatewayYou 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.
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