Command referenceipconfig
ipconfig command (Windows / CMD)
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 / option | Meaning |
|---|---|
| /all | Show full adapter configuration. |
| /release | Release DHCP leases. |
| /renew | Renew DHCP leases. |
| /flushdns | Clear the DNS resolver cache. |
| /displaydns | Show 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.
Related commands
- pingTest reachability and measure response time with ICMP echo requests.
- netstatDisplay active connections, listening ports, routing data, and protocol statistics.
- Get-NetIPAddressRetrieve IP address configuration from Windows network interfaces.
- curlTransfer data to or from URLs using many network protocols.
- sshOpen a secure remote shell or run a command over SSH.
- pingTest IP reachability and measure round-trip response time.
- Invoke-WebRequestSend HTTP and HTTPS requests and return response metadata and content.
- scpCopy files securely between local and SSH-accessible hosts.
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.