ip
NetworkFundamentals In real LinuxShow and configure interfaces, addresses and routes
Name: ip: Internet Protocol tool
This command needs a real Linux system; you can practise it in real Linux mode.
Description
ip is the modern Linux tool for showing and configuring networking (from iproute2), replacing ifconfig, route and arp. Subcommands are per object: ip addr for addresses, ip link for interfaces, ip route for routes, ip neigh for neighbours.
Changes made with ip don't survive a reboot; persistent setup goes through NetworkManager, netplan and the like.
Syntax
ip [OPTION]... OBJECT COMMANDCommon options
| addr | Show IP addresses (short: ip a) |
| addr add / addr del | Add / remove an address: ip addr add 192.168.1.10/24 dev eth0 (needs root) |
| link | Show network interfaces |
| link set DEV up / down | Bring an interface up / down (needs root) |
| route | Show the routing table |
| route add / route del | Add / remove a route: ip route add default via 192.168.1.1 (needs root) |
| route get | Which route and interface traffic to an address uses |
| neigh | Show the ARP table |
| -br / -brief | Brief: one line per interface |
| -c | Colour the output (short for -color) |
| -s / -stats | Also show traffic statistics |
| -4 / -6 | IPv4 / IPv6 only |