How to find your Linux IP address

Inspect your Linux IP address with iproute2, NetworkManager or desktop settings, and separate interface configuration from public reachability.

Published:

Find your Linux IP address without reconfiguring networking

Run ip -brief address show in a terminal to inspect local interface addresses on a Linux system with iproute2 installed. For the public source used by a browser, open the IP checker on that system. A local Linux IP address and a public observation answer different questions. Neither requires changing routes, restarting networking or installing an unknown diagnostic script.

Before copying a Linux IP address, identify the environment involved. A desktop browser, remote server, container and virtual machine may have different interfaces and exits. If you are connected through SSH, commands run on the remote machine describe that machine's environment. They do not reveal your laptop's local assignment simply because your laptop displays the terminal window.

Read a Linux IP address with the ip command

These commands display the Linux IP address configuration without changing it:

ip -brief address show
ip -4 address show
ip -6 address show

The first gives a compact interface summary; the others focus on IPv4 or IPv6. For an interface you identified in the output, use a command such as ip address show dev enp1s0. Replace the example name with the actual interface. The ip-address manual documents address display, scope and state fields.

Keep the interface name and prefix length beside the Linux IP address. In an example like 192.168.10.20/24, the suffix describes the prefix length rather than another part of the host address. An address can remain listed even when the interface cannot carry the traffic you intend. Configuration and successful delivery are separate observations, so inspect both when troubleshooting a failure.

Choose the relevant Linux IP address

A machine can have Ethernet, Wi-Fi, bridges, VPN interfaces and container networks. Loopback usually appears as lo and serves communication within that network namespace. A Linux IP address on a bridge or tunnel may be relevant to one workload without describing the physical link used by another. Do not assume the first non-loopback value is the answer to every network question.

For example, a host might have a private Ethernet address and a separate container bridge. A service running in the container can listen on the bridge-side network while a published host port provides a different access path. Copying whichever Linux IP address looks familiar into a remote connection command can therefore target the wrong interface. Start from the application and the client that needs to reach it.

Inspect a Linux IP address with NetworkManager

On systems managed by NetworkManager, use:

nmcli device status
nmcli device show

The status view helps identify devices; the detailed view includes active IP information. You can inspect one device with nmcli device show enp1s0, substituting its real name. The NetworkManager reference explains the commands and distinguishes active device information from saved connection profiles. A saved profile does not prove that its settings are currently in use.

You do not need connection modify, up, down or secret-display options to read a Linux IP address. If NetworkManager is not installed or does not manage that interface, use the system's actual network manager and the kernel interface view instead. Installing another manager solely to inspect an address can introduce an unnecessary configuration conflict.

Find a Linux IP address in desktop settings

Graphical desktops commonly expose connection details through their Network or Wi-Fi settings. Open the active wired or wireless connection and read its details. The exact labels depend on the distribution and desktop environment. A graphical Linux IP address display should be matched to the same interface shown in the terminal before treating differences as a problem.

Use this view when a quick local check is enough. Keep the gateway and DNS fields distinct from the interface address. They describe other aspects of the connection, not alternative names for the computer. If the graphical tool lists several IPv6 values, record the one relevant to the task instead of truncating the list and assuming every destination selects the same source.

Relate a Linux IP address to its route

Read default routes with ip route show default and ip -6 route show default. For the kernel's route decision toward a particular IPv4 destination, a command such as ip route get 1.1.1.1 can display the selected interface and source. This performs a route lookup rather than sending a reachability probe. The ip-route manual documents the distinction.

The selected Linux IP address is useful evidence about that route lookup, but applications can use proxies, explicit bindings, policy routing or separate namespaces. Therefore, a default-route view should not be described as proof of every application's public exit. Compare it with an observation from the actual application when that application's behavior is the issue.

Public and private Linux IP address observations

A private IPv4 interface value can sit behind a home router, cloud gateway or another translation layer. A remote website then sees a different public source. This is expected in many environments. Use the public versus private guide to classify the Linux IP address before deciding which value belongs in a local configuration or an internet support report.

For a public observation from a headless host, an administrator can use an approved HTTPS address-reporting endpoint. Remember where the command executes and disclose the request to that provider. A command inside a container measures that container's outgoing path. It cannot prove that the browser on your personal device exposes the same Linux IP address or uses the same proxy settings.

IPv6 scope and a Linux IP address

IPv6 can assign several addresses to one interface. Link-local addresses serve the local link, while global and temporary addresses have different selection and lifetime considerations. A Linux IP address may therefore appear alongside flags or lifetime fields that matter to the task. Preserve those fields in an administrator's diagnostic record rather than copying a bare string with no context.

Be careful with the word global in command output. Scope terminology does not automatically certify public internet reachability; private-use assignments can still appear with a global scope label in an interface listing. The IPv6 test checks browser endpoint reachability separately. A configured Linux IP address is a prerequisite for some paths, not a guarantee that all routes and services work.

Containers, namespaces and a Linux IP address

Linux network namespaces can have their own interfaces, routes and protocol state, as described in the network namespaces manual. The same command can therefore produce a different Linux IP address when executed in a different namespace. Containers often use this separation, but their precise behavior depends on the runtime and network mode. Identify the workload's environment before comparing it with the host's configuration.

If you need to inspect an isolated service, follow the platform's authorized diagnostic procedure and record where each command ran. A host address, container address and external translated source can all be valid at once. A browser lookup alone cannot inventory every namespace or establish which host ports have been published for a service.

When a Linux IP address is missing or unexpected

Check whether you selected the correct interface, whether it is active and whether assignment is expected from DHCP, a static profile or another mechanism. A missing value can have several causes. Avoid changing the Linux IP address or restarting network services over an SSH session before establishing a recovery path; an incorrect change can interrupt the very connection you are using to investigate.

For a service-access problem, also consider whether the service is listening on the intended interface and whether firewall and routing policy permit the connection. The address alone cannot answer those questions. A successful Linux IP address inspection should narrow the uncertainty, not encourage a broad set of unrelated changes that make the original failure harder to reproduce.

Record a Linux IP address for support

Include the address, family, prefix, interface, execution environment and observation time. State whether it came from a local interface command, a route lookup or a remote public observation. Explain the symptom and expected behavior. That compact report gives the Linux IP address a clear meaning without exposing unrelated configuration or credentials.

When comparing before and after a change, keep the command and environment consistent. A result from the host and one from a container are not a controlled comparison by default. Once the Linux IP address is correctly identified, use the subnet calculator, DNS lookup or the relevant application diagnostics for the next specific question. Preserve the distinction between address configuration, naming, routing and successful service access.