How to Find Your IP Address in Ubuntu Using the Command Line

The Network Identification Vector

When configuring a headless Ubuntu server, setting up remote SSH access, or diagnosing local network connectivity issues, determining the machine’s assigned IP address is an absolute necessity. Because server environments rarely feature graphical user interfaces, administrators must extract this networking data directly from the terminal. Relying on outdated commands (like ifconfig, which is deprecated) often leads to errors on modern Ubuntu deployments.

How to Find Your IP Address

The modern, standard tool for querying network interfaces in Ubuntu is the ip command.

1. Open your terminal application or connect via your existing SSH session.
2. To view a concise, highly readable list of all active network interfaces and their assigned IP addresses, execute the following command:

ip -brief address show

3. The terminal will immediately output a cleanly formatted table. The first column displays the interface name (e.g., lo for loopback, or eth0/wlan0 for your primary connection).
4. The second column shows the status (UP or DOWN).
5. The third column displays the actual IPv4 and IPv6 addresses. Look for the interface marked as UP; the number formatted as 192.168.x.x/24 or 10.x.x.x/24 is your local IP address.

By using the brief flag, you avoid the massive wall of text generated by older networking commands, allowing for immediate identification.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.