System command

ipconfig command

Display or manage IP configuration and the DNS resolver cache.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

ipconfig [/allcompartments] [/all] [/renew [<adapter>]] [/release [<adapter>]] [/renew6[<adapter>]] [/release6 [<adapter>]] [/flushdns] [/displaydns] [/registerdns] [/showclassid <adapter>] [/setclassid <adapter> [<classID>]]

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Examples

Example usage for ipconfig.

ipconfig /all

Parameters, options and clauses

Option / clauseDescription
/allcompartmentsDisplay information for all network compartments.
/allDisplay full TCP/IP configuration for all adapters.
/release [<adapter>]Release the DHCP IPv4 configuration for all adapters or the selected adapter.
/renew [<adapter>]Renew the DHCP IPv4 configuration for all adapters or the selected adapter.
/release6 [<adapter>]Release DHCPv6 configuration for all adapters or the selected adapter.
/renew6 [<adapter>]Renew DHCPv6 configuration for all adapters or the selected adapter.
/flushdnsClear the DNS resolver cache.
/displaydnsDisplay the DNS resolver cache.
/registerdnsRefresh DHCP leases and register DNS names.
/showclassid <adapter>Display the DHCP class ID for the selected adapter; * can select all adapters.
/setclassid <adapter> [<classID>]Set or clear the DHCP class ID for the selected adapter.
---Microsoft documents this switch; use the linked reference for accepted values, effects and version limits.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory