Three tools, one job: inspect and configure network interfaces. ip is the modern Linux standard. ifconfig is the classic Unix tool (still found on macOS and older Linux). ipconfig is the Windows equivalent.

Interfaces · IP Addresses · Routes · Linux · macOS · Windows
01 — Which Tool to Use
ToolPlatformStatus
ipLinuxModern standard — part of iproute2. Preferred on all current Linux distros.
ifconfigLinux, macOS, BSDLegacy — deprecated on Linux but still default on macOS and BSD.
ipconfigWindowsBuilt-in Windows tool for viewing and managing IP configuration.
On modern Linux, always reach for ip first. On macOS, ifconfig still reigns. On Windows, ipconfig is your only native option.
02 — Show Interface Information
Linux — ip
# All interfaces with addresses ip addr show # Short form ip a # Specific interface ip addr show eth0
Linux / macOS — ifconfig
# All interfaces ifconfig # Specific interface ifconfig eth0
Windows — ipconfig
# Summary ipconfig # Full details (DNS, DHCP, MAC address) ipconfig /all
Typical ip addr output
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff inet 192.168.1.50/24 brd 192.168.1.255 scope global eth0 inet6 fe80::5054:ff:fe12:3456/64 scope link
FieldMeaning
UP / DOWNInterface is enabled / disabled
mtuMaximum Transmission Unit — largest frame size in bytes
link/etherMAC address of the interface
inetIPv4 address with prefix length (CIDR)
inet6IPv6 address
scope globalGlobally routable address
scope linkLink-local only — not routed beyond the local segment
03 — Routing Table
Linux
ip route show # or ip r
macOS / legacy Linux
netstat -rn
Windows
route print
Typical output (Linux)
default via 192.168.1.1 dev eth0 proto dhcp 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.50
04 — Configure Interfaces
Bring interface up / down
# Linux (ip) ip link set eth0 up ip link set eth0 down # Legacy (ifconfig) ifconfig eth0 up ifconfig eth0 down
Assign a static IP (Linux)
# Temporary — lost on reboot ip addr add 192.168.1.100/24 dev eth0 ip route add default via 192.168.1.1
Remove an IP address
ip addr del 192.168.1.100/24 dev eth0
Flush / renew DHCP
# Windows ipconfig /release ipconfig /renew # Linux (dhclient) sudo dhclient -r eth0 # release sudo dhclient eth0 # renew
Flush DNS cache (Windows)
ipconfig /flushdns
⚠  Changes made with ip addr add or ifconfig are temporary and lost on reboot. Use your distro's network configuration tool (nmcli, netplan, /etc/network/interfaces) for persistent changes.
05 — Useful ip Commands
CommandWhat it does
ip aShow all addresses on all interfaces
ip link showShow interface state (UP/DOWN, MTU, MAC)
ip rShow the routing table
ip neighShow ARP / neighbour table
ip -s linkShow interface statistics (TX/RX packets, errors)
ip link set eth0 mtu 9000Set jumbo frames MTU
ip route get 8.8.8.8Show which route and interface would be used to reach an IP
06 — ipconfig Key Commands (Windows)
CommandWhat it does
ipconfigShow IP, subnet mask, and gateway for all adapters
ipconfig /allFull details — MAC, DHCP server, DNS servers, lease times
ipconfig /releaseRelease DHCP lease on all adapters
ipconfig /renewRequest a new DHCP lease
ipconfig /flushdnsClear the local DNS resolver cache
ipconfig /displaydnsShow the current DNS cache contents
ipconfig /registerdnsRe-register DNS names and refresh DHCP leases
ℹ  ipconfig /flushdns is one of the most commonly needed Windows commands — run it after changing DNS settings or editing the hosts file to ensure the change takes effect immediately.