Where to find your IP address and gateway

Your IP address is the number your device uses to connect to your network and the internet. Your gateway is the device (usually your router) that connects your home network to the internet. Both numbers live in your device's network settings, and you can find them in under a minute using built-in tools — no software to download or install.

The steps differ slightly depending on whether you use Windows, Mac, or Linux, but the information is always in the same place: your network configuration settings. Once you know where to look, you can find these numbers whenever you need them.

Key Takeaways

  • On Windows, open Command Prompt and type ipconfig to see your IP address listed as "IPv4 Address" and your gateway listed as "Default Gateway".
  • On Mac, go to System Settings > Network, click your active connection, and look for "IP Address" and "Router" in the TCP/IP tab.
  • On Linux, open a terminal and type ip addr show for your IP address and ip route to find your gateway.
  • Your IP address changes periodically unless your router is set to assign you a static IP, which is common for devices you access frequently.
  • If you need these numbers to troubleshoot a connection or set up a device, write them down — they may change the next time you restart your router.

Finding your IP address and gateway on Windows

Open the Start menu and type "Command Prompt" into the search box. Click the Command Prompt app when it appears. In the black window that opens, type ipconfig and press Enter.

Look for the section labeled with your network name (usually "Ethernet" if you are plugged in with a cable, or "Wireless LAN adapter" if you are on Wi-Fi). In that section, you will see "IPv4 Address" — that is your IP address. Just below it, you will see "Default Gateway" — that is your router's address. Both are usually numbers separated by periods, like 192.168.1.5 or 10.0.0.1.

If you want to keep these numbers for later, you can right-click in the Command Prompt window, select "Select All", then right-click again and choose "Copy" to paste the results into a text file or email.

Finding your IP address and gateway 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 your network connections. Click the one you are currently using — it will have a green dot next to it. A details panel will open on the right side. Click the "Details" button (or look for a "TCP/IP" tab if it appears). Your IP address is listed next to "IP Address", and your router's address is listed next to "Router".

Finding your IP address and gateway on Linux

Open a terminal window. Type ip addr show and press Enter. Your IP address will appear in the output next to "inet" for each network connection. Look for the one that is not labeled "lo" (the loopback address, which is only for your computer talking to itself).

To find your gateway, type ip route in the same terminal and press Enter. Look for the line that starts with "default via" — the number after "via" is your gateway address.

Why you might need these numbers

Most of the time, your device handles IP addresses automatically and you never need to think about them. But if you are setting up a printer on your network, troubleshooting a connection problem, or accessing your router's settings page, you will need to know your IP address or gateway.

Your gateway address is also the address you type into a web browser to log into your router and change its settings — for example, typing 192.168.1.1 into the address bar might take you to your router's login page. Your IP address is what you would give to someone else if they need to send data directly to your computer on the network.

Static vs. dynamic IP addresses

By default, your router assigns you a dynamic IP address, which means it can change. This usually happens when you restart your router or after a set period of time (often 24 hours or longer). For most everyday use, this does not matter — your device reconnects automatically and everything works the same way.

If you set up a device that other people need to reach at the same address every time — like a home server or a network printer — you might want to set a static IP address instead. This means your router always assigns the same number to that device. You can usually do this in your router's settings page, which you access by typing your gateway address into a web browser.

What to do if you cannot find your gateway

If the steps above do not show a gateway address, or if the gateway address is blank, your device may not be connected to a network yet. Check that you are plugged in with an ethernet cable or connected to your Wi-Fi network, then run the commands again.

If you are connected but still see no gateway, your network may be set up in an unusual way — for example, if you are on a guest network or a network that does not have internet access. In that case, the gateway address may not exist or may be different from what you expect. Contact the person who manages the network for help.

Frequently Asked Questions

Is my IP address the same as my gateway address?

No. Your IP address is your device's number on the network. Your gateway is your router's number. They are different, though they usually start with the same numbers (like 192.168.1.x). Your gateway is almost always the lowest number on the network, often ending in .1 or .254.

Can someone use my IP address to hack me?

Your IP address alone is not enough to hack your device. It tells someone where to send data, but your router's firewall blocks incoming connections by default. However, if you are running a server or have opened ports in your router settings, someone could potentially reach your device. Keep your router's password strong and avoid opening ports unless you have a specific reason.

Will my IP address change if I restart my router?

Possibly. If your router is set to assign dynamic IP addresses (the default), your device may get a different number after a restart. In practice, it often gets the same number back, but it is not may provide. If you need the same address every time, set a static IP in your router's settings.

What is the difference between IPv4 and IPv6?

IPv4 addresses use four numbers separated by periods (like 192.168.1.5). IPv6 addresses use longer strings of letters and numbers separated by colons (like 2001:db8::1). Most home networks still use IPv4, but IPv6 is becoming more common. Both can appear in your network settings, and both work the same way — one is just a newer format with more possible addresses.

How do I log into my router using the gateway address?

Open a web browser and type your gateway address into the address bar, then press Enter. You will usually see a login page asking for a username and password. The default is often "admin" for both, but check your router's manual or the sticker on the back of the device. If you changed the password and forgot it, you may need to reset the router to factory settings.