What Your IP Address Is and Why You Might Need It

Your computer's IP address is a unique number that identifies your device on a network — either your home network or the internet. It looks like four numbers separated by periods, such as 192.168.1.5 (called an IPv4 address) or a longer string of letters and numbers (called an IPv6 address). Most home networks use IPv4.

You may need to find your IP address to troubleshoot network problems, set up a printer or smart home device, connect to your computer remotely, or provide it to technical support. The method depends on whether you use Windows, Mac, or Linux, and whether you want your local IP address (the one on your home network) or your public IP address (the one the internet sees).

Key Takeaways

  • Your local IP address identifies your computer on your home network and usually starts with 192.168 or 10.
  • Your public IP address is what websites and the internet see, and you can find it by searching "what is my IP" in any browser.
  • On Windows, open Command Prompt and type ipconfig to see your local IP address in seconds.
  • On Mac, go to System Settings, click Network, and select your connection to view your local IP address.
  • On Linux, open a terminal and type hostname -I or ip addr to display your local IP address.

Finding Your Local IP Address on Windows

The fastest way on Windows is to use Command Prompt. Press the Windows key, type cmd, and press Enter. A black window opens. Type ipconfig and press Enter.

Look for the section labeled with your connection type — either "Ethernet adapter" if you use a cable, or "Wireless LAN adapter" if you use Wi-Fi. Find the line that says IPv4 Address. The number next to it is your local IP address. It usually starts with 192.168 or 10.

If you prefer not to use Command Prompt, you can also go to Settings, click Network & Internet, select your connection (Wi-Fi or Ethernet), and scroll down to find "IPv4 address" listed under your connection details.

Finding Your Local IP Address on Mac

On Mac, open System Settings (or System Preferences on older versions). Click Network in the sidebar. Select the connection you are using — either Wi-Fi or Ethernet — from the list on the left.

Your local IP address appears on the right side of the window, labeled as IP Address. It is usually a four-part number starting with 192.168 or 10. If you do not see it when ready, make sure your connection is active and selected.

Finding Your Local IP Address on Linux

Open a terminal window. Type hostname -I and press Enter. Your local IP address appears on the next line. This is the simplest method for most Linux distributions.

If that command does not work, try ip addr instead. Look through the output for a line that starts with "inet" (not "inet6"). The number after "inet" and before the forward slash is your local IP address.

Finding Your Public IP Address

Your public IP address is different from your local one. It is the address that websites and services on the internet see when you connect to them. To find it, open any web browser and search for "what is my IP" or "my IP address". Google and other search engines will display your public IP address at the top of the results.

You can also visit websites like whatismyipaddress.com or ipinfo.io, which show your public IP address and sometimes additional information like your approximate location and internet service provider. These sites are safe and do not collect or store your information.

Understanding the Difference Between Local and Public IP Addresses

Your local IP address is assigned by your home router and only works on your home network. Other devices on your network use this address to find and communicate with your computer. If you restart your router or your computer, this address may change.

Your public IP address is assigned by your internet service provider and is how the rest of the internet identifies your connection. Websites, email servers, and online services see this address. It changes less often than your local address, usually only when you restart your modem or after a period of inactivity.

For most everyday tasks — setting up a printer, connecting a smart home device, or troubleshooting network issues — you need your local IP address. You need your public IP address only if you are setting up remote access to your computer or if someone outside your network needs to reach you.

What to Do If You Cannot Find Your IP Address

If the commands above do not show an IP address, check that your device is actually connected to the network. Look for a Wi-Fi icon in your system tray (Windows) or menu bar (Mac), or check the network indicator in your Linux desktop environment. If you see a connection icon, you are connected.

If you are connected but still see no address, restart your computer and try again. If the problem continues, restart your router by unplugging it for 30 seconds, plugging it back in, and waiting for the lights to stabilize. Then check your IP address again.

If you still cannot find your IP address after these steps, the problem may be with your network hardware or your internet service provider. Contact your internet service provider's technical support, or if you are on a work or school network, contact your IT department.

Frequently Asked Questions

Will my IP address change if I restart my computer?

Your local IP address may change after a restart, depending on your router's settings. Most home routers use DHCP, which assigns addresses automatically and may give your computer a different one each time. Your public IP address usually stays the same unless you restart your modem or go offline for several hours.

Is it safe to share my IP address?

Sharing your local IP address with someone on your home network is safe — they need it to connect to your computer or printer. Sharing your public IP address is generally safe for most purposes, but avoid giving it to unknown people or untrusted websites, as it can be used to target your network with attacks.

Why does my computer have two different IP addresses?

Your computer may show both an IPv4 address (four numbers) and an IPv6 address (letters and numbers). Both are valid. IPv4 is older and more common on home networks. IPv6 is newer and becoming more widespread. Most devices and networks support both at the same time.

Can I make my IP address permanent so it never changes?

Yes, you can assign a static IP address to your computer through your router settings. This prevents your local address from changing after restarts. However, this requires access to your router's admin panel and is usually not necessary for home use. If you need help, contact your internet service provider or router manufacturer.

What if I need my IP address for a printer or smart device?

You need your local IP address. Use the method for your operating system above to find it, then enter that address into the printer or device's setup screen. If the address changes later, the device may lose connection — in that case, you can either find the new address and update the device, or set a static IP address in your router to prevent changes.