To find your server IP address, use the command line tool ipconfig (Windows), ifconfig or ip addr show (macOS/Linux), or check your router's admin panel. The IP address is a unique identifier assigned to your server on a network.
Every device connected to a network-whether a desktop, laptop, or dedicated server-has a unique IP address. This address enables communication between devices. For servers, knowing the IP is essential for remote access, hosting websites, running applications, or configuring firewalls.
Most servers use IPv4 addresses formatted as four numbers separated by dots (e.g., 192.168.1.10). Some newer systems use IPv6, which uses eight groups of four hexadecimal digits (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). The method to find the address depends on your operating system and whether the server is local or remotely hosted.
IP addresses are assigned either automatically via DHCP or manually through static configuration. On most home networks, routers assign IPs dynamically using DHCP. Servers in data centers often have static IPs set by administrators to ensure consistent access.
When you run a command like ipconfig on Windows or ip addr show on Linux, the system returns a list of network interfaces. Look for entries labeled "Ethernet adapter," "Wi-Fi," or "enp3s0" (Linux interface names). The IP address appears next to "IPv4 Address" or "inet."
For example, on a Linux machine, running ip addr show might return:
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 192.168.1.50/24 brd 192.168.1.255 scope global changing enp3s0
valid_lft 86400sec preferred_lft 86400sec
The IP address is 192.168.1.50. This is the server's internal IP, used within the local network.
Each OS has distinct tools to retrieve the IP address. The process varies slightly depending on terminal.
| Operating System | Command | Where to Find the IP |
|---|---|---|
| Windows | ipconfig |
Look under "Wireless LAN adapter" or "Ethernet adapter" for "IPv4 Address" |
| macOS | ifconfig |
Search for "inet" under "en0" (Wi-Fi) or "en1" (Ethernet) |
| Linux | ip addr show |
Find "inet" under the relevant interface (e.g., "eth0" or "wlan0") |
On Windows, open Command Prompt or PowerShell and type ipconfig. Scroll through the output until you see a section labeled "Ethernet adapter Local Area Connection" or similar. The line "IPv4 Address" shows the server's internal IP.
On macOS, open Terminal and enter ifconfig | grep "inet ". This filters the output to show only lines containing "inet," which includes IP addresses. The server's IP appears as the first value after "inet" (e.g., 192.168.1.45).
On Linux, use hostname -I for a quick display of all IPv4 addresses assigned to network interfaces. This command returns only the IP, making it ideal for scripts or automation.
Internal IP addresses (like 192.168.1.50) are used within private networks. They are not visible to the internet. External IP addresses are public and assigned by your ISP. These are required to host services accessible from the web.
To find your external IP address, use a service like https://api.ipify.org. Open a browser or run wget -qO- https://api.ipify.org in a terminal. The response returns your public IP, such as 203.0.113.45.
For example, in a shell script, you can capture your public IP with:
curl -s https://api.ipify.org
This command outputs only the IP address, useful for logging or automated checks.
Many servers use both internal and external IPs. A web server may have an internal IP of 192.168.1.100 and a public IP of 203.0.113.45. The public IP routes traffic from the internet to the internal IP via port forwarding on the router.
Users often confuse their server's public IP with their private IP. The private IP is used internally. The public IP is used for internet-facing services. You cannot access a server from outside the network using its private IP unless port forwarding is configured.
Another common error is assuming that the loopback address (127.0.0.1) is the server's actual IP. This address refers to the local machine and is used for testing. It does not represent the server's network location.
A less obvious point: some cloud providers assign multiple IPs to a single virtual server. AWS EC2 instances can have a private IP (e.g., 172.31.16.10) and a public IP (e.g., 54.232.10.12). The public IP is visible only if the instance has an Elastic IP attached.
I once encountered a misconfigured Ubuntu server where ip addr show returned no IPv4 address. The issue was a missing network interface configuration in /etc/netplan/01-netcfg.yaml. After correcting the YAML file and applying netplan apply, the IP appeared. This highlights that even correct commands fail if the network stack isn't properly set up.
If you don't have access to the server's command line, use online tools. Websites like whatismyipaddress.com or ipinfo.io display your public IP when you visit them.
These tools are useful for troubleshooting remote connections. For example, if a client reports they can't reach your server, verify the public IP matches the DNS record or firewall rule.
Some tools also provide geolocation data. ipinfo.io returns the country, city, and ISP associated with an IP. This helps detect unauthorized access attempts or validate routing paths.
Once you've located your server's IP address, you can proceed with remote administration using SSH, RDP, or web-based control panels. Ensure your firewall allows incoming connections on the necessary ports.
For users managing multiple devices, checking your router's DHCP lease list reveals all active IPs on the network. Access the router's admin page (usually at 192.168.1.1) and look under "Connected Devices" or "DHCP Clients."
Understanding how to find your server IP address is foundational for network management. securing remote access, accurate IP identification prevents downtime and improves reliability.