ip is the command for network configuration on modern Linux, part of the iproute2 package. It replaces the older ifconfig, route, arp, and netstat collectively, each of which was tied to specific kernel interfaces that no longer cover all of Linux's networking features.
ip addr # show all addresses (alias: ip a)
ip link # show all interfaces (alias: ip l)
ip route # show the routing table (alias: ip r)
ip neigh # ARP / neighbour table
ip addr add 10.0.0.1/24 dev eth0
ip link set eth0 up
ip route add default via 10.0.0.254
ip is what distributions actually use under the hood via NetworkManager or systemd-networkd. Manual changes are not persistent; they are lost on reboot unless saved in a config file. For permanent changes, edit /etc/netplan/*.yaml (Ubuntu) or the appropriate NetworkManager / systemd-networkd files.
Discussed in:
- Chapter 12: Networking — Configuring Network Interfaces