Understanding Ipconfig and Ipconfig Commands
Explore how the ipconfig command works on Windows, what each switch does, and when to use it for troubleshooting.
What IPCONFIG Shows You
ipconfig is the primary command-line tool for viewing IP configuration on Windows. When you run it without options, it lists active network adapters, their IPv4 and IPv6 addresses, subnet masks, and default gateways. This quick snapshot is often enough to confirm whether your device is on the expected network and has a valid address.
Adding the /all flag reveals deeper details, including DHCP information, DNS servers, lease times, and physical MAC addresses. These fields are invaluable when diagnosing connectivity issues, DNS problems, or suspected IP conflicts.
Run these from Command Prompt or PowerShell.
ipconfig # Show basic adapter info
ipconfig /all # Detailed IP configuration
ipconfig /release # Drop current DHCP lease
ipconfig /renew # Request a new lease
ipconfig /flushdns # Clear DNS resolver cache
Mac and Linux Alternatives to IPCONFIG
ipconfig is specific to Windows, but macOS and most Linux distributions provide similar functionality through ifconfig, ip, and networksetup. While syntax differs, the goals are the same: show interface details, addresses, and routes.
On macOS, you can quickly see the IP address for your Wi‑Fi interface with ipconfig getifaddr en0, and list all interfaces with ifconfig. On Linux, ip addr and ip route provide detailed information about addresses and routing tables.
Use Terminal for these commands.
ipconfig getifaddr en0 # Wi‑Fi IPv4 address
ifconfig # Detailed interface list
Run these in a shell on most modern distros.
ip addr show # Addresses per interface
ip route show # Current routing table