Windows

What is ipconfig on Linux?

Linux has no ipconfig — that is the Windows command. Use ip addr show to see interface addresses. The various ipconfig switches map to different Linux tools rather than to flags on one command, because Linux splits addressing, DHCP and DNS caching across separate programs.
Try it in a live lab

Free interactive lab. No signup. Runs in your browser.

Command by command

WindowsLinuxWhat it gives you
ipconfigip -brief addr showAddresses per interface
ipconfig /allip addr showFull detail including MAC
ipconfig /releasedhclient -r eth0Give up the DHCP lease
ipconfig /renewdhclient eth0Request a new lease
ipconfig /flushdnsresolvectl flush-cachesOnly if systemd-resolved is the resolver
ipconfig /displaydnsresolvectl show-cachesystemd-resolved only, on recent systemd releases

What the output looks like

$ ip -brief addr show
lo               UNKNOWN        127.0.0.1/8
eth0             UP             192.168.1.42/24

Why the two differ

Windows bundles addressing, DHCP client control and DNS cache management into one command because one service owns all three. Linux does not have that service. Addresses are kernel state managed through ip; DHCP is a userspace client such as dhclient or systemd-networkd; DNS caching may be handled by systemd-resolved, dnsmasq, nscd, or nothing at all. So there is no single equivalent, and which command you need depends on what your distribution actually runs.

The trap

ipconfig /flushdns has no universal counterpart. resolvectl flush-caches clears only systemd-resolved's cache: where systemd-resolved is not running the command fails, and where it runs but is not the resolver applications use (check /etc/resolv.conf) it succeeds while flushing a cache nothing reads. Many Linux systems have no DNS cache at all, in which case there is nothing to flush and a stale answer is coming from somewhere else — the application, the browser, or an upstream resolver.

Common questions

Is there an ipconfig package I can install?

No. The name does not exist on Linux in any standard package. If a tutorial tells you to run ipconfig on Linux it has confused the two operating systems — the closest historical equivalent was ifconfig, itself now superseded by ip addr.

How do I see my default gateway, the way ipconfig shows it?

ip route show default. Linux keeps the gateway in the routing table rather than as a property of the interface, which is why it does not appear in ip addr output.

Stop reading, start running

Open the lab, go live, and run ip addr show against real Linux networking in your browser. No install, no signup.

Launch the lab →