Your IP address is a number that identifies your computer on a network

An IP address is a set of numbers separated by periods — something like 192.168.1.5 or 2001:0db8:85a3:0000:0000:8a2e:0370:7334 — that acts as your computer's address on a network. Every device connected to the internet or a local network has one. You may need to find yours to troubleshoot connection problems, set up a printer or router, or share files with another computer on the same network.

Your computer actually has two IP addresses: a local IP address (used only on your home or office network) and a public IP address (how the wider internet sees you). The method you use depends on which one you need and which operating system you are running.

Key Takeaways

  • On Windows, open Command Prompt and type ipconfig to see your local IP address listed as "IPv4 Address".
  • On Mac, go to System Settings, click Network, select your connection, and look for the IP address field.
  • On Linux, open a terminal and type hostname -I to display your local IP address.
  • To find your public IP address on any system, search "what is my IP" in a web browser or visit a site like whatismyipaddress.com.
  • Your local IP address stays the same most of the time, but your public IP address can change when your internet provider reassigns it.

Finding your local IP address on Windows

The quickest way on Windows is through Command Prompt. Press the Windows key, type cmd, and press Enter. A black window will open. Type ipconfig and press Enter. Look for the line that says "IPv4 Address" — the number next to it is your local IP address.

If you prefer not to use Command Prompt, you can also find it through Settings. Open Settings, go to Network & Internet, click on your connection type (Wi-Fi or Ethernet), and scroll down. You will see "IPv4 address" listed there.

Both methods show the same information. Command Prompt is faster if you need to check it often, while Settings is easier if you are not comfortable with text commands.

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 — and look at the right panel. Your IP address appears in a field labeled "IP Address".

If you use the terminal instead, press Command + Space, type terminal, and press Enter. In the terminal window, type ifconfig and press Enter. Look for the section that matches your connection type. The line starting with "inet" (not "inet6") shows your local IP address.

Finding your local IP address on Linux

Open a terminal window. Type hostname -I and press Enter. Your local IP address will appear on the next line. This works on most Linux distributions including Ubuntu, Fedora, and Debian.

If that command does not work, try ifconfig or ip addr show instead. Both will display your IP address along with other network information. Look for the line that starts with "inet" under your active connection.

Finding your public IP address

Your public IP address is what websites see when you visit them. To find it, open any web browser and search for "what is my IP". Google will show your public IP address at the top of the results. Alternatively, visit a dedicated site like whatismyipaddress.com or ipchicken.com.

These sites work the same way on Windows, Mac, and Linux — they all use your web browser, so the operating system does not matter. Your public IP address is assigned by your internet service provider and can change over time, especially if you restart your router or if your provider reassigns addresses.

The difference between local and public IP addresses

Your local IP address is used only within your home or office network. It lets your computer talk to your printer, router, and other devices on the same Wi-Fi or wired connection. Local IP addresses usually start with 192.168, 10.0, or 172.16. They are private and do not change unless you manually set them or your router reassigns them.

Your public IP address is how the rest of the internet identifies your connection. Websites log it, your email provider sees it, and streaming services use it to know where you are. Your internet service provider assigns it, and it can change without warning. If you need a stable public IP address for work or hosting, you can contact your provider about a static IP, though this usually costs extra.

Why you might need your IP address

You need your local IP address to set up devices on your network. If you are installing a printer, setting up a smart home device, or accessing your computer remotely from another machine on the same network, you will need the local IP address. You also need it to log into your router — the address usually starts with 192.168.1.1 or 192.168.0.1, and you enter it in a web browser's address bar.

You need your public IP address less often, but it matters if you are troubleshooting connection issues with a website or service, reporting a problem to your internet provider, or checking whether your location is being blocked by a service. Some people also check it to confirm they are using a VPN correctly — if you turn on a VPN, your public IP address should change to match the VPN server's location.

Frequently Asked Questions

Can someone find my computer if they know my IP address?

Your public IP address can tell someone your general location and internet provider, but not your exact address or which specific computer is yours. Your local IP address is only visible to devices on your network, so it is not a security risk to the outside world. Neither one directly reveals your home address or personal information.

Why does my IP address keep changing?

Your public IP address changes when your router restarts or your internet provider reassigns addresses. Your local IP address usually stays the same, but some routers reassign it if a device has been offline for a while. If you need a stable local IP address for a device like a printer, you can set a static IP in your router settings.

What is the difference between IPv4 and IPv6?

IPv4 addresses use four numbers separated by periods (like 192.168.1.5) and are the older standard. IPv6 addresses use longer strings with colons and letters (like 2001:0db8:85a3::8a2e:0370:7334) and are the newer standard designed to handle more devices. Most networks still use IPv4, but both may appear on your computer.

Do I need to hide my IP address?

Your local IP address is private to your network and does not need hiding. Your public IP address is visible to every website you visit, but it does not directly expose personal information. If you want privacy from your internet provider or websites, a VPN masks your public IP address. If you want to block others from finding your computer, a firewall (which most systems have by default) does that job.

How do I change my IP address?

For your local IP address, restart your router or set a static IP in your router settings. For your public IP address, restart your modem or contact your internet provider to request a new one. If you use a VPN, connecting to a different server location will give you a different public IP address.