ipconfig.co.uk

ipconfig vs ifconfig: what is actually different

They are often treated as the same command with a letter swapped. They are not. One is a Windows display tool with a handful of DHCP and DNS switches; the other is a Unix configuration tool from 1983 that can rewrite an interface's address, mask and hardware settings. This page lines them up.

At a glance

ipconfigifconfig
PlatformWindows (NT 3.5 onward). A different, unrelated ipconfig exists on macOS.Unix: Linux (net-tools), macOS, FreeBSD, OpenBSD, NetBSD, Solaris, AIX, HP-UX
First appeared1994 (Windows NT 3.5); Windows 95 had a limited version plus the graphical winipcfg1983 (4.2BSD); Linux port 1992–93
Name meansIP configurationInterface configuration
Main purposeDisplay TCP/IP settings; manage DHCP leases; manage the DNS client cacheDisplay and set interface parameters: addresses, masks, MTU, flags, MAC
Can set an IP address?NoYes
Can bring an interface up/down?NoYes
Can release/renew DHCP?Yes (/release, /renew)No; use dhclient, dhcpcd, nmcli, or macOS ipconfig set en0 DHCP
Can flush DNS?Yes (/flushdns)No
Shows DNS servers?Yes (/all)No
Shows default gateway?YesNo; use route, ip route or netstat -rn
Shows DHCP server and lease?Yes (/all)No
Shows packet counters?NoYes
Shows link state?Yes (Media disconnected)Yes (RUNNING flag; status: on BSD)
Option syntaxSlash switches: /all, /renewKeywords: eth0 up, eth0 mtu 9000; a few dash flags (-a, -s)
Needs elevation forRelease, renew, registerdns, setclassidAny change; viewing is unprivileged
StatusCurrent, built in, unchanged since VistaDeprecated on Linux (replaced by ip); current on macOS and BSD
Modern replacementPowerShell Get-NetIPConfiguration for scripting; netsh for changesLinux: ip. macOS: networksetup for persistent changes.

Same information, different shape

Here is one Ethernet interface on a machine with the same address, as each tool would show it.

ipconfig (Windows)
Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : home
   Link-local IPv6 Address . . . . . : fe80::1c3e:7a2f:9d4b:6e01%12
   IPv4 Address. . . . . . . . . . . : 192.168.1.42
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
ifconfig (Linux)
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.42  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::a00:27ff:fe4e:66a1  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:4e:66:a1  txqueuelen 1000  (Ethernet)
        RX packets 184213  bytes 231770215 (221.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 97312  bytes 11284570 (10.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Notice what each leaves out. ipconfig has no MAC address or counters until you add /all, and never shows the MTU. ifconfig never shows the gateway or DNS. The Unix philosophy splits those into route and resolv.conf; Windows bundles everything into one report.

Equivalent commands

TaskWindows ipconfigUnix ifconfig (+ friends)Linux ip
Show configurationipconfigifconfigip -br addr
Show everythingipconfig /allifconfig -a + route -n + cat /etc/resolv.confip addr + ip route + resolvectl status
Release DHCPipconfig /releasedhclient -r eth0nmcli con down "X"
Renew DHCPipconfig /renewdhclient eth0nmcli con up "X"
Flush DNSipconfig /flushdnssudo killall -HUP mDNSResponder (macOS)resolvectl flush-caches
Show DNS cacheipconfig /displaydnsn/aresolvectl statistics
Set static IPn/a (netsh)ifconfig eth0 192.168.1.50 netmask 255.255.255.0ip addr add 192.168.1.50/24 dev eth0
Interface downn/a (netsh)ifconfig eth0 downip link set eth0 down
Set MTUn/a (netsh)ifconfig eth0 mtu 1400ip link set eth0 mtu 1400
Change MACn/a (Device Manager)ifconfig eth0 hw ether …ip link set eth0 address …

Why the names are similar

Both are contractions in the Unix naming tradition. ifconfig configures interfaces. Microsoft's TCP/IP stack for Windows NT was developed in the early 1990s, when ifconfig was the obvious model, and its diagnostic tool was named for what it shows: the IP configuration. The Windows tool was never intended to configure anything, which is why its writing abilities stop at DHCP and DNS-cache housekeeping. Apple's separate ipconfig came from NeXTSTEP-era Mac OS X and controls the IP configuration daemon; the name is a coincidence, not a port. Full history →

Which one should you learn?

  • You use Windows: ipconfig for looking, netsh or PowerShell for changing. There is nothing else.
  • You use Linux: learn ip. ifconfig may not even be installed, and when it is, it hides addresses and cannot do half of what you need. Muscle memory for ifconfig is fine for a quick look.
  • You use macOS: ifconfig for looking, networksetup for changing, ipconfig getifaddr en0 for scripts.
  • You use BSD: ifconfig, wholeheartedly. It is the primary, maintained tool there.
  • You use all of them: the cheat sheet exists for you.

Related pages

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.