Knowing how to check IP address from command prompt is an essential skill for troubleshooting network issues, verifying configurations, or simply understanding how your device connects to the internet. The command line provides a direct and efficient way to access this information without navigating through graphical settings, saving time and offering deeper insights into network status.
Understanding IP Addresses and Their Role
An IP address serves as a unique identifier for every device on a network, allowing it to communicate with other devices and access the internet. There are two primary versions in use: IPv4, which consists of four sets of numbers separated by dots, and IPv6, a newer format designed to provide a vastly larger pool of addresses. These addresses can be either static, manually configured, or dynamic, assigned automatically by a router via DHCP. Grasping this fundamental concept is crucial before you check IP address from command prompt because the output you see will be one of these two types, depending on your network setup.
Using the ipconfig Command on Windows
On Windows operating systems, the primary tool for network diagnostics is the Command Prompt, and the command you will use most frequently is ipconfig . This utility displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHDHCP) and Domain Name System (DNS) settings. To utilize it, you simply need to open the Command Prompt—accessible by searching "cmd" in the Start menu—and type a specific variant of the command.
Basic and Detailed Output
ipconfig : Running this basic command provides a quick overview, listing the Ethernet adapter and wireless adapter addresses if present.
ipconfig /all : For a more comprehensive check, appending "/all" displays detailed information including the DHCP server, DNS servers, MAC address, and the current IP lease duration.
Interpreting the Results on Windows
Once you execute the command, the interface will present a block of text. When you check ip address from command prompt on this screen, focus on the section labeled "Ethernet adapter" or "Wireless LAN adapter". Look for the line titled "IPv4 Address". The number listed directly after this label, usually formatted as 192.168.1.100, is the private IP address assigned to your device on the local network. If you see "IPv6 Address", that indicates your machine is also using the newer protocol.
Utilizing the ifconfig Command on Linux and Mac
While Windows uses ipconfig, Unix-based systems like Linux and macOS traditionally rely on the ifconfig command, which stands for "interface configuration". Although modern Linux distributions often require users to install the net-tools package or use the newer ip command, ifconfig remains widely recognized. Opening the Terminal and typing ifconfig will immediately display configuration details for all active network interfaces.