What an IP Address Is and Why You Might Need It
Your computer's IP address is a set of numbers 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 (for a local network) or something like 203.45.67.89 (for the internet). You need to know your IP address when troubleshooting network problems, setting up a printer or router, connecting to a remote computer, or configuring certain software.
There are two types of IP addresses you might encounter. Your local IP address (or private IP address) is what your device uses within your home or office network. Your public IP address is what the internet sees when you connect to websites — it's assigned by your internet service provider. This guide covers how to find both.
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 shown in the details pane.
- On Linux, open a terminal and type hostname -I to display your local IP address.
- To find your public IP address on any device, visit a website like whatismyipaddress.com or search "what is my IP" in any browser.
- Your local IP address stays the same most of the time, but your public IP address can change when you restart your router or modem.
Finding Your Local IP Address on Windows
The fastest way on Windows is through Command Prompt. Press the Windows key and type cmd, then press Enter to open Command Prompt. Type ipconfig and press Enter. Look for the line labeled "IPv4 Address" — the number next to it is your local IP address. It usually starts with 192.168 or 10.0.
If you prefer not to use Command Prompt, you can also find it through Settings. Open Settings, click Network & Internet, then select Wi-Fi or Ethernet depending on how you connect. Click the name of your network connection, and scroll down to find "IPv4 address" in the details section.
Finding Your Local IP Address on Mac
On Mac, open System Settings (or System Preferences on older versions) and click Network in the left sidebar. Select the connection you use — Wi-Fi or Ethernet — and your IP address appears in the right pane next to "IP Address." It typically starts with 192.168.
If you want to use the terminal instead, open Terminal (found in Applications > Utilities), type ifconfig, and press Enter. Look for the line that says "inet" followed by a number — that is your local IP address. Ignore any lines that start with 127.0.0.1, as that is your computer talking to itself.
Finding Your Local IP Address on Linux
Open a terminal window and type hostname -I, then press Enter. Your local IP address appears on the next line. This command works on most Linux distributions including Ubuntu, Fedora, and Debian.
If that command does not work, try ip addr show instead. Look for lines labeled "inet" followed by a number and a slash — the number before the slash is your IP address. Ignore any lines showing 127.0.0.1.
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" or visit a site like whatismyipaddress.com. The page displays your public IP address within seconds — no software or commands needed.
Your public IP address can change without warning, especially if you restart your modem or router. Your local IP address (the one inside your home network) stays the same most of the time unless you manually change it or your router assigns a new one after a long period without use.
Common Reasons Your IP Address Might Look Different
If you run ipconfig or check your settings multiple times and see different numbers, several things could be happening. Your router may have reassigned your IP address — this is normal and happens automatically. If you are using both Wi-Fi and Ethernet at the same time, each connection has its own IP address, so make sure you are looking at the right one.
If you see an address starting with 169.254, your computer is not properly connected to the network. Restart your router and your computer, then check again. If the problem continues, restart your modem as well — unplug it for 30 seconds, then plug it back in and wait for the lights to stabilize.
What to Do With Your IP Address Once You Have It
Once you know your local IP address, you can use it to connect to your printer, access your router's settings page (usually by typing the IP address into a browser), or set up remote access to your computer. Write down your local IP address or take a screenshot — you may need it later for troubleshooting or setup.
Your public IP address is less useful to write down because it changes, but you might need it if someone outside your home network is trying to connect to you remotely. In that case, they would use your public IP address, not your local one.
Frequently Asked Questions
Why do I have more than one IP address?
If you are connected to both Wi-Fi and Ethernet at the same time, your computer has a separate IP address for each connection. You also have a local IP address (used inside your home network) and a public IP address (used on the internet). These are all normal and expected.
Is my IP address the same as my MAC address?
No. Your IP address is a set of numbers that changes based on your network. Your MAC address is a unique identifier built into your network hardware and almost never changes. They serve different purposes and are not interchangeable.
Can someone find me using my public IP address?
Your public IP address shows your general location (usually your city or region), but not your exact address. It identifies your internet connection, not you personally. However, you should still avoid sharing it with strangers online.
What if ipconfig or hostname does not work?
Make sure you typed the command correctly and pressed Enter. On Windows, Command Prompt must be open. On Mac and Linux, the terminal must be open. If the command still does not work, try the Settings or System Preferences method instead — it shows the same information without using the command line.
Will restarting my router change my local IP address?
Usually not. Your local IP address typically stays the same after a restart. However, if your computer has been off for a long time, your router might assign it a different local IP address when it reconnects. Check your settings after a restart to be sure.