Skip to main content

Command referenceipconfig

ipconfig command (Windows / CMD)

WindowsCMDnetworkbeginner

What it does

Display and manage Windows IP configuration and DNS client state. Searches for the ipconfig command cmd usually need CMD syntax, practical switches, and notes on how it compares with PowerShell or Linux alternatives. This page covers syntax, common options, and copyable examples for Command Prompt.

Display and manage Windows IP configuration and DNS client state.

Syntax

ipconfig [/all | /release [adapter] | /renew [adapter] | /flushdns]

Common options

Flag / optionMeaning
/allShow full adapter configuration.
/releaseRelease DHCP leases.
/renewRenew DHCP leases.
/flushdnsClear the DNS resolver cache.
/displaydnsShow cached DNS records.

Practical examples

Full configuration

ipconfig /all

Shows addresses, gateways, DHCP, and DNS details.

Clear DNS cache

ipconfig /flushdns

Removes cached DNS resolver entries.

Renew DHCP

ipconfig /release && ipconfig /renew

Requests fresh DHCP configuration.

Linux ↔ Windows equivalent

Closest match: Get-NetIPAddress (Windows / PowerShell). Retrieve IP address configuration from Windows network interfaces.

Common mistakes

  • Releasing a remote machine's active network lease and losing the session.
  • Expecting ipconfig to show listening ports.

FAQ

What does ipconfig do in Command Prompt?

Display and manage Windows IP configuration and DNS client state.

How do I run ipconfig in CMD?

Open Command Prompt and follow `ipconfig [/all | /release [adapter] | /renew [adapter] | /flushdns]`; quote paths containing spaces.

What is a practical ipconfig example in CMD?

Try `ipconfig /all` — Shows addresses, gateways, DHCP, and DNS details.

Can ipconfig be used in a batch file?

Yes. Check its exit code and escape CMD metacharacters when input is variable.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.