ipconfig.co.uk

The complete guide to ipconfig, ifconfig and friends

Whether you typed ipconfig into a Windows Command Prompt, ifconfig into a Mac or Linux terminal, or you just want to know why your computer has an address starting with 169.254, this site explains the tools, decodes the output and shows you the modern replacements.

Windowsipconfig /all
Linux (modern)ip -br addr
macOS / BSD / older Linuxifconfig
PowerShellGet-NetIPConfiguration

Start with your platform

What these commands actually do

Every computer on a network has a set of interface settings: an IP address (or several), a subnet mask or prefix length, a default gateway, DNS servers and a hardware (MAC) address. These commands show you those settings and, in some cases, change them.

ToolPlatformShows settingsChanges settingsStatus
ipconfigWindowsYesOnly DHCP release/renew, DNS cache, class IDsCurrent, built in
ifconfigLinuxYesYes (address, mask, MTU, up/down…)Deprecated since ~2009, often not installed
ifconfigmacOS, FreeBSD, OpenBSD, NetBSDYesYes, including Wi-Fi and VLANs on BSDCurrent, actively maintained
ipLinuxYesYes, everythingCurrent, the standard tool
netshWindowsYesYes, static IP, DNS, reset stackCurrent, partly superseded by PowerShell
PowerShell Get-Net*WindowsYesYes, via New-/Set- cmdletsCurrent, recommended for scripting
networksetupmacOSYesYes, per network serviceCurrent
nmcliLinux with NetworkManagerYesYes, persistentCurrent

The five-second version

Windows · Command Prompt
ipconfig
ipconfig /all
ipconfig /release
ipconfig /renew
ipconfig /flushdns

The first line shows address, mask and gateway per adapter. /all adds MAC address, DHCP server, lease times and DNS servers. Full ipconfig reference →

Common questions, answered directly

Why does my computer have an IP address starting 169.254?
Your DHCP request went unanswered, so the operating system self-assigned a link-local address (APIPA on Windows, "self-assigned" on macOS). You will not reach the internet with it. Diagnose it →
Is ipconfig the same as ifconfig?
No. They share a purpose and a similar name but nothing else: different platforms, different syntax, different abilities. Full comparison →
How do I find my public IP address?
None of these commands show it, because your router translates addresses. Use the live checker or curl ipconfig.co.uk/ip from any terminal.
What is the difference between ipconfig /release and /renew?
Release tells the DHCP server you are giving the address back and leaves the adapter with no address. Renew asks for a lease again. You usually run both, in that order. Details →
How do I flush the DNS cache?
Windows ipconfig /flushdns; macOS sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; Linux resolvectl flush-caches. Every platform, including browsers →

How this site is organised

  • Command references cover one tool each, every option, with sample output you can compare to your own screen.
  • Reading the output explains what each line means: subnet masks and CIDR, IPv6 address types, temporary addresses, zone IDs, MAC formats, DHCP leases.
  • Troubleshooting is a symptom-first playbook: no gateway, media disconnected, can ping an IP but not a name, duplicate addresses, DHCP failures.
  • Background pages cover the history from 4.2BSD to iproute2, a glossary and an FAQ.

Last reviewed . Command syntax verified against Windows 11, Ubuntu 24.04, macOS 15 and FreeBSD 14 unless noted otherwise.

Spotted a mistake or a switch we have missed? Every page on this site is written to be checked against real output, so please test on your own machine and compare.