IP addresses & interfaces
Inspect network interfaces, IPs and routes with the modern ip command.
ip replaces ifconfig
ifconfig and route are deprecated on most distros; ip (from iproute2) is the current standard and is what you'll find preinstalled everywhere, including minimal images like Alpine.
View interfaces and addresses
ip a (short for ip address show) lists every network interface and its assigned IPv4/IPv6 addresses.
ip a
ip a show eth0
ip link # interfaces only, no addressesView and change routes
ip route shows the routing table, including the default gateway β the one used when no more specific route matches.
ip route
ip route show default
sudo ip route add 10.0.0.0/24 via 192.168.1.1Bring an interface up or down
Rarely needed day to day, but useful when debugging a stuck interface.
sudo ip link set eth0 down
sudo ip link set eth0 upPersistent configuration
ip commands are not persistent across reboots by themselves. Ubuntu/Debian use netplan (/etc/netplan/*.yaml) or /etc/network/interfaces; RHEL/Fedora and openSUSE use NetworkManager (nmcli, nmtui); your bashrack VPS ships with working networking out of the box via cloud-init, so you only need this for extra interfaces or static IP changes.