Finding your IP address depends on your operating system
Your computer has an IP address assigned to it by your router or network. The steps to find it are different on Windows, Mac, and Linux, but all take less than a minute. You will need to open either a command-line tool or your network settings, depending on which system you use.
Most people need their local IP address — the one your router gave your computer on your home or office network. This starts with 192.168, 10.0, or 172.16 on most home networks. If you need your public IP address — the one the internet sees when you browse — that requires a different method.
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 your IP address appears under "IP Address".
- On Linux, open a terminal and type hostname -I or ip addr to display your local IP address.
- Your public IP address (what websites see) is different from your local one and requires visiting a website like whatismyipaddress.com to check.
- Your local IP address may change if your router restarts or if you do not set a static IP, but your public IP usually stays the same for weeks or months.
Finding your IP address on Windows
Open the Start menu and type "Command Prompt" into the search box. Click the Command Prompt app when it appears. A black window will open with a blinking cursor.
Type ipconfig and press Enter. A list of network information will appear. Look for the line that says "IPv4 Address" — the number next to it is your local IP address. It will look something like 192.168.1.105. If you see multiple IPv4 Address entries, the one under "Ethernet adapter" or "Wireless LAN adapter" is the one your computer is currently using to connect to the network.
If you want to see more detail, type ipconfig /all instead. This shows your MAC address, DNS servers, and other network settings in addition to your IP address.
Finding your IP address on Mac
Click the Apple menu in the top-left corner and select "System Settings" (or "System Preferences" on older versions). Click "Network" in the left sidebar.
You will see a list of network connections on the left — usually "Wi-Fi" or "Ethernet". Click the one you are currently using. On the right side of the window, your IP address will appear next to "IP Address". It will look something like 192.168.1.105.
If you want to see your MAC address or other network details, click "Advanced" at the bottom right, then click the "TCP/IP" tab.
Finding your IP address on Linux
Open a terminal window. On most Linux distributions, you can right-click on the desktop and select "Open Terminal", or press Ctrl+Alt+T.
Type hostname -I and press Enter. Your local IP address will appear on the next line. This is the simplest method and works on nearly all Linux systems.
If that does not work, type ip addr instead. Look for a line that starts with "inet" (not "inet6") under the connection you are using. The number after "inet" and before the forward slash is your IP address.
Finding your public IP address
Your public IP address is what websites and internet services see when you connect to them. It is different from your local IP address and is assigned by your internet service provider.
To find your public IP address, open a web browser and visit whatismyipaddress.com, myip.com, or ipchicken.com. Your public IP address will display on the page immediately. You do not need to download anything or enter any information.
You can also find your public IP address by typing "what is my IP" into Google or another search engine. Google will show your public IP address at the top of the search results.
The difference between local and public IP addresses
Your local IP address is used only within your home or office network. Your router assigns it to your computer, and other devices on the same network use it to send data to you. This address never leaves your network — the internet does not see it.
Your public IP address is assigned by your internet service provider and is visible to every website you visit, every email server you connect to, and every online service you use. When you browse the web, servers use your public IP to send information back to your router, which then forwards it to your computer using your local IP address.
If you restart your router, your public IP address may change, though it often stays the same for weeks or months. Your local IP address may also change if your router restarts, unless you have set up a static IP address on your computer or router.
Why you might need your IP address
You need your local IP address when you want to connect to your computer from another device on the same network, set up port forwarding on your router, or access your computer's settings remotely. You also need it if you are troubleshooting network problems and your internet service provider or tech support asks for it.
You need your public IP address when you want to know how websites see your location, when you are setting up remote access to your computer from outside your home network, or when you need to report it to a service for security or troubleshooting reasons.
If you are having trouble connecting to a device or service, writing down both your local and public IP addresses can help you or a support person diagnose the problem more quickly.
Frequently Asked Questions
Can my IP address change?
Yes. Your local IP address can change if your router restarts or if you do not set a static IP. Your public IP address usually stays the same for weeks or months, but your internet service provider can change it without warning. If you need a stable IP address for remote access or port forwarding, you can set a static local IP on your computer or router.
Is my IP address the same as my MAC address?
No. Your MAC address is a unique identifier for your network card and never changes. Your IP address is assigned by your router and can change. They serve different purposes — your MAC address identifies your device on your local network, while your IP address is how data gets routed to you.
Why do I see multiple IP addresses when I run ipconfig?
You may have multiple network connections — for example, both Wi-Fi and Ethernet. Each connection gets its own IP address. Look for the one under the connection you are actually using. If you are connected to Wi-Fi, use the IPv4 Address under "Wireless LAN adapter".
Is it safe to share my IP address?
Sharing your public IP address is generally safe — websites already know it when you visit them. Sharing your local IP address is safe only with people on your own network. Never share either address with someone you do not trust, as it could be used to attempt unauthorized access to your network.
What if ipconfig or hostname -I does not show an IP address?
This usually means your computer is not connected to the network. Check that your Wi-Fi is turned on or that your Ethernet cable is plugged in. If you are connected but still see no IP address, your router may not be assigning addresses correctly. Try restarting your router and running the command again.