What you need to know right now

Your Linux machine has an IP address — the number that identifies it on your network. You find it by running one of four commands in the terminal, depending on which Linux distribution you use and what information you need. The fastest method is hostname -I, which shows your address in one line. If that does not work, ip addr or ifconfig will show the same information with more detail. A graphical method exists too if you prefer clicking over typing.

You need this address when you are setting up your home network security, troubleshooting connection problems, or accessing your machine remotely. Knowing how to find it yourself means you do not have to hunt through settings menus or call for help.

Key Takeaways

  • The command hostname -I is the fastest way to see your IP address — type it, press Enter, and read the number that appears.
  • The command ip addr shows the same address plus extra detail about your network connection, and works on all modern Linux systems.
  • The older command ifconfig does the same job as ip addr but may not be installed on newer distributions.
  • You can also find your IP address through the graphical settings menu without opening a terminal, though it takes more clicks.
  • Your machine may have two addresses — one for your local network and one that is not usable outside your home — so look for the one starting with 192.168 or 10.

Using hostname -I for the quickest answer

Open a terminal window. On most Linux desktops, you can right-click the desktop and select "Open Terminal Here", or press Ctrl+Alt+T. Type this command exactly:

hostname -I

Press Enter. The terminal will print one or more numbers separated by spaces. The number you are looking for usually starts with 192.168 or 10. That is your local network address — the one you use to reach your machine from other devices on your home network. If you see multiple numbers, the first one is usually the one you need.

This method works on Ubuntu, Debian, Fedora, and most other distributions. It is the simplest because it shows only what you asked for, with no extra information to sort through.

Using ip addr to see all network details

Open a terminal and type:

ip addr

Press Enter. The output will be longer than hostname -I — it shows every network connection your machine has, including ones you may not use. Look for a section labeled inet (not inet6, which is a different type of address). The number next to inet is your IP address. Again, look for the one starting with 192.168 or 10 if you see multiple addresses.

This command works on all modern Linux systems and is becoming the standard way to check network information. The extra detail it shows is useful if you are troubleshooting network problems, because you can see whether your connection is active and what its status is.

Using ifconfig if ip addr does not work

If ip addr does not work, try:

ifconfig

Press Enter. The output looks similar to ip addr but is formatted differently. Look for a section labeled inet and read the number next to it. This is your IP address. Again, if you see multiple addresses, the one starting with 192.168 or 10 is your local network address.

ifconfig is an older command that some newer Linux distributions have stopped including by default. If you get a message saying the command is not found, use ip addr instead. You do not need both — they do the same job.

Finding your IP address through the graphical settings menu

If you prefer not to use the terminal, you can find your IP address by clicking through your system settings. On Ubuntu and most GNOME-based desktops, click the system menu in the top right corner (usually a power icon or your username), then select "Settings". Look for a section called "Network" or "Wi-Fi" depending on whether you are connected by cable or wireless.

Click on the network you are currently connected to. A panel will open showing your connection details, including your IP address. It may be labeled "IPv4 Address" or just "Address". Write down the number that starts with 192.168 or 10.

On other desktops like KDE or Cinnamon, the path is slightly different — look for "Network Settings" in your process menu — but the information is in the same place. This method takes longer than typing a command, but it requires no terminal knowledge.

Understanding what the numbers mean

Your machine may show two or three different IP addresses. The one you need for your home network is the one starting with 192.168 or 10 — these are private addresses that only work inside your home network. If you see an address starting with 127, that is your machine talking to itself and is not useful for connecting to other devices.

If you see an address starting with 169.254, your machine is not properly connected to your network. This usually means your router did not assign it an address, and you should check your Wi-Fi password or cable connection.

Write down your IP address and keep it somewhere you can find it. You will need it when you set up remote access, configure network security, or troubleshoot connection problems.

Frequently Asked Questions

Why do I see more than one IP address?

Your machine may have multiple network connections — one for Wi-Fi, one for a wired cable, or one for a virtual network. The command shows all of them. Use the one that matches how you are actually connected to your network. If you are on Wi-Fi, look for the address next to your Wi-Fi connection name.

My IP address keeps changing. Is that a problem?

Not usually. Your router assigns addresses automatically, and they can change when you restart your machine or reconnect to the network. If you need a permanent address for security or remote access, you can set a static IP in your router settings, but that is a separate task.

What is the difference between 192.168 and 10 addresses?

Both are private addresses that work only on your home network. The difference is just how your router decided to organize them. Either one is correct. Most home routers use 192.168, but some use 10. The important thing is that your address matches the range your router is using.

Can I use this address to access my machine from outside my home?

No. Your private IP address (192.168 or 10) only works inside your home network. To access your machine from outside, you need your public IP address, which your internet provider assigns to your router. That is a different number and requires different setup steps.

What if the terminal says command not found?

Try a different command. If hostname -I does not work, use ip addr. If ip addr does not work, use ifconfig. At least one of these will work on any Linux system. If none of them work, use the graphical settings method instead.