Devices
How to Find Your IP Address on Linux
Devices · 4 min read · Updated October 12, 2026
The fastest way to find your IP address on Linux is to open a terminal and type hostname -I, then press Enter. It prints your private IP address immediately, usually something like 192.168.1.5.
Like every other device, your Linux machine has two addresses that matter: a private IP address for your home network and a public IP address that the rest of the internet sees. The commands below show you both.
The quickest command: hostname -I
Open a terminal (Ctrl+Alt+T on Ubuntu) and type hostname -I, then press Enter. The capital letter i matters. Linux prints one or more IP addresses separated by spaces.
The first address is your private IP on the local network. If you see an address starting with fe80 or ending in lots of colons, that is an IPv6 address. Your regular IPv4 address is the one with the dots.
Full details with ip addr
For more detail, type ip addr and press Enter. Each network connection on your machine gets its own numbered section, and the address you want is on the line labeled inet. Ignore the section called lo, that is just your machine talking to itself.
This command works on Ubuntu, Debian, Fedora, Arch, and practically every modern distro. The older ifconfig command does the same job but is not installed by default on many systems anymore, so ip addr is the one to learn.
Using NetworkManager: nmcli
If your system uses NetworkManager (most Ubuntu and Fedora desktops do), you can type nmcli dev show and press Enter. Look for the IP4.ADDRESS line under your Wi-Fi or wired connection.
You can also find your IP without the terminal: on Ubuntu, open Settings, click Wi-Fi or Network, then click the gear icon next to your connected network. Your IP address is listed in the details window, much like the steps on Windows 11.
See your public IP address
The commands above show your private network address, not the public IP the internet sees. For the public one, open a browser and load our homepage, which displays it instantly.
From the terminal you can also type curl ifconfig.me and press Enter. It prints your public IP as plain text. If your public IP keeps changing, that is normal: your internet provider reassigns it from time to time.
Frequently asked questions
What is the simplest command to find my IP on Linux?
Type hostname -I in a terminal and press Enter. It prints your private IP address immediately. Note the capital I, since a lowercase i will not work.
Which command shows full network details on Linux?
Use ip addr. It lists every network connection on your machine with full details. Find the line labeled inet next to your Wi-Fi or Ethernet connection and skip the section called lo.
Does ip addr work on Ubuntu, Fedora, and Arch?
Yes. The ip command is part of the iproute2 tools, which ship with virtually every modern Linux distro, so ip addr works the same everywhere.
How do I find my IP without the terminal on Ubuntu?
Open Settings, click Wi-Fi or Network, then click the gear icon next to your connected network. Your IP address appears in the details window under IPv4.
Why does Linux show multiple IP addresses?
Your machine has one address per network connection, plus loopback (lo) and possibly IPv6 addresses. The address on your Wi-Fi or wired connection, starting with 192.168 or 10, is the one you usually want.
How do I see my public IP from the Linux terminal?
Type curl ifconfig.me and press Enter. Or open a browser and visit our homepage, which shows your public IP with no signup.