How to find a machine's IP address on Windows, Mac, or Linux

The fastest way to find a machine's IP address depends on whether you're looking at the computer itself or searching for it from another device. If you're sitting at the machine, you can find it in about 30 seconds using built-in tools. If you're looking for a different computer on your network, you'll need to either log into that machine or use your router's settings to see all connected devices.

The method also changes slightly depending on whether you want the local IP address (the one used inside your home or office network) or the public IP address (the one your internet provider assigns to your whole network). Most of the time, you need the local one.

Key Takeaways

  • On Windows, open Command Prompt and type ipconfig to see your local IP address instantly.
  • On Mac or Linux, open Terminal and type ifconfig or ip addr to find your local IP address.
  • To find another computer's IP address, log into your router's settings and look for a list of connected devices, usually under "DHCP Clients" or "Connected Devices".
  • Your public IP address appears on websites like whatismyipaddress.com, but your local IP address is what you need to connect to devices on your own network.

Finding your IP address on Windows

Open Command Prompt by pressing the Windows key, typing cmd, and pressing Enter. A black window will open with a blinking cursor.

Type ipconfig and press Enter. You'll see a list of network adapters. Look for the section labeled "Ethernet" (if you're plugged in with a cable) or "Wireless LAN adapter WiFi" (if you're on WiFi). The line that says IPv4 Address is your local IP address — it usually looks like 192.168.1.100 or 10.0.0.50.

If you see multiple adapters listed, you only need the one you're actually using to connect to the internet. Ignore the others.

Finding your IP address on Mac

Open Terminal by pressing Command + Space, typing terminal, and pressing Enter. A white window will open.

Type ifconfig and press Enter. You'll see several sections. Look for the one that starts with en0 (Ethernet) or en1 (WiFi). Under that section, find the line that says inet followed by a number — that's your local IP address.

If you're on a newer Mac using Apple Silicon, you may see en10 instead of en0 or en1. The process is the same — find the section for your active connection and look for the inet line.

Finding your IP address on Linux

Open a terminal window. Type ip addr and press Enter. You'll see numbered sections for each network adapter.

Look for the section labeled with your connection type — usually eth0 for Ethernet or wlan0 for WiFi. Under that section, find the line starting with inet followed by a number and a slash. The number before the slash is your local IP address.

Some older Linux systems use ifconfig instead of ip addr. If ip addr doesn't work, try ifconfig — the output format is slightly different but the information is in the same place.

Finding another computer's IP address through your router

To find the IP address of a different machine on your network, you need to log into your router's settings. Open a web browser and type 192.168.1.1 or 192.168.0.1 into the address bar. One of these is usually your router's address.

You'll be asked for a username and password. If you haven't changed these, they're often admin and admin, or admin and the password printed on the back of your router. If neither works, you can reset the router to factory settings by holding the reset button for 10 seconds, which will restore the default login.

Once logged in, look for a section called DHCP Clients, Connected Devices, Device List, or LAN Devices. The exact name depends on your router brand. This section shows every device currently connected to your network along with its IP address and device name.

Find the machine you're looking for in the list. The IP address will be displayed next to its name.

Understanding local versus public IP addresses

Your local IP address is only used within your home or office network. It's assigned by your router and changes if you restart your router or if the device disconnects and reconnects. This is the address you use when connecting to printers, security cameras, or other devices on your own network.

Your public IP address is assigned by your internet service provider and is visible to websites you visit. It's the same for your entire household or office — all your devices share it when they go out to the internet. You can see your public IP address by visiting websites like whatismyipaddress.com or by searching "what is my IP" in any search engine.

For most home networking tasks, you need the local IP address. You only need the public one if you're setting up remote access to your network from outside your home, or if you're troubleshooting an internet connection issue with your service provider.

What to do if you can't find the IP address

If the commands above don't show an IP address, your device may not be connected to the network. Check that your WiFi is turned on or that your Ethernet cable is plugged in. Then run the command again.

If you're trying to find another computer's IP address and it doesn't appear in your router's device list, that machine may not be connected to the network, or it may be on a different network entirely. Try connecting it to the same WiFi or Ethernet network and wait 30 seconds, then check the router's device list again.

If you can't log into your router, try the default password for your specific router model — search online for "[your router brand] default password". If you've changed the password and forgotten it, you'll need to reset the router to factory settings.

Frequently Asked Questions

Why does my IP address keep changing?

Your local IP address can change if your router restarts or if your device disconnects and reconnects to the network. If you need a device to keep the same IP address, you can set a static IP in your router's settings or on the device itself. Your public IP address changes less often but can shift if your internet service provider restarts your connection or if you restart your modem.

Can I find someone else's IP address if they're not on my network?

Not through your router — your router only shows devices connected to your own network. If you need to find someone's public IP address for legitimate reasons, you would need their cooperation or access to server logs. Finding someone's IP address without permission is illegal in most places.

What's the difference between 192.168 and 10.0 IP addresses?

Both are private IP ranges used inside networks. Your router assigns addresses from one of these ranges to devices on your network. The specific range depends on your router's settings, but both work the same way. You don't need to change which range you're in — your router handles it automatically.

Do I need to write down my IP address?

Only if you're setting up a device that needs a permanent address, like a printer or security camera. For everyday use, you don't need to remember it. You can look it up anytime using the commands in this guide.