Updated: 28 September 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9

ifconfig belongs to the old net-tools package, which minimal installations of Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 no longer include. Use the ip command instead:

ip addr            # IP addresses (short: ip a)
ip link            # interfaces and their state
ip route           # routing table and default gateway
ip -s link         # traffic counters

If you still need ifconfig

dnf install net-tools     # AlmaLinux / Rocky
apt install net-tools     # Ubuntu / Debian

net-tools also brings back netstat, route and arp. See "Deprecated Linux Networking Commands and Their Replacements" for the modern equivalents.

Reading the ip addr output

  • Each interface starts with a number and its name, for example 2: eth0 or 2: ens3. lo is the local loopback interface.
  • state UP means the interface is connected.
  • The inet line shows the IPv4 address with its prefix (for example 192.0.2.10/24); inet6 shows IPv6 addresses.

Show only the public IPv4 addresses with ip -4 addr show scope global, or all addresses in one line with hostname -I.

Ucartz services for this topic

Was this answer helpful? 0 Users Found This Useful (0 Votes)