Linux does not have one universal default IP address. A Linux computer normally gets an address from a network’s DHCP server, uses an address configured by an administrator, or has only local addresses until it is connected; the familiar 127.0.0.1 is the IPv4 loopback address, not the computer’s general network address.
Why Linux Has No Single Default IP
Linux is an operating system used on laptops, servers, routers, virtual machines, and small embedded devices. Those systems connect to very different networks, so there is no single IP address that every Linux installation receives. The address depends on the active network interface and how that interface is configured.
On a typical home network, a router acts as a DHCP server. When a Linux device joins the network, it requests configuration and the router usually leases it a private address, such as 192.168.1.24 or 10.0.0.18. Another router might use a different range, and a server administrator may assign an address manually. A machine with its network disconnected may have no usable address on that interface at all.
It is therefore more useful to ask, “What IP address is assigned to this Linux interface right now?” than “What is the Linux default IP?” The answer can change when the device joins another network, renews its DHCP lease, connects to a VPN, or switches between Wi-Fi and Ethernet.
IP Address, Loopback, and Default Gateway
Several network terms are easy to confuse. An IP address identifies an interface on an IP network. A default gateway is the router or next hop used to reach destinations for which the computer has no more specific route. The gateway has its own address; it is not the Linux computer’s address.
For example, a laptop might have the address 192.168.1.24, a router at 192.168.1.1, and a default route that sends internet-bound traffic to that router. The laptop’s address is assigned to its interface, while the gateway appears in the routing table. A device can have an IP address but no default route, in which case it may communicate with nearby devices yet fail to reach networks beyond its local subnet.
Loopback is different again. The IPv4 address 127.0.0.1, often called localhost, sends traffic back to the same machine. IPv6 uses ::1 for the same purpose. These addresses let local applications communicate with services on the same computer; they do not identify the computer to other devices on a LAN.
How to Find the Address on a Linux System
The standard modern command for inspecting network interfaces and their assigned addresses is ip, usually provided by the iproute2 package. Open a terminal and run:
ip addresslists interfaces and their IPv4 and IPv6 addresses.ip -4 addressshows only IPv4 addresses.ip -6 addressshows only IPv6 addresses.ip routeshows IPv4 routes, including a default route if one exists.ip -6 routeshows IPv6 routes.
Look for an interface such as enp3s0 for wired Ethernet or wlp2s0 for Wi-Fi; names vary by system. An address shown after inet is IPv4, while one after inet6 is IPv6. The interface called lo is loopback. Ignore it when you want the address other devices use to reach the machine.
For a quick summary, hostname -I prints addresses associated with the host, but it may return several addresses and does not explain which interface or route each one belongs to. For diagnosis, ip address and ip route provide more context. A graphical desktop may also show connection details in its network settings, though the labels and steps differ by distribution and desktop environment.
Where Linux Addresses Come From
Many desktop and server installations use DHCP for IPv4. The client asks for network settings, and a DHCP server can provide an address, subnet information, a lease duration, and one or more DNS servers. The server often gives the same device the same address repeatedly, but a DHCP lease is not necessarily a permanent reservation. Reconnecting or changing networks can produce a different address.
Administrators can instead configure a static address, meaning the address is set as part of the system’s network configuration rather than obtained dynamically for each connection. Static settings are common for servers and infrastructure that need a predictable address. They must match the network plan: the address should not conflict with another device, and the subnet, gateway, and DNS settings must be appropriate.
IPv6 has several ways to configure addresses. A network may advertise a prefix and allow devices to form addresses through Stateless Address Autoconfiguration (SLAAC), use DHCPv6, or combine methods. A Linux interface can hold more than one address at the same time, including temporary IPv6 addresses used for privacy. That is one reason a command may display multiple valid-looking results.
Common Address Ranges and What They Indicate
A private IPv4 address is intended for use inside private networks and is not directly routed across the public internet. The private ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Seeing an address such as 192.168.0.35 on a home computer is ordinary; it usually means the computer has a local address behind a router, not that this is its public internet address.
If an IPv4 interface has an address in 169.254.0.0/16, it may have selected a link-local address after it could not obtain normal DHCP configuration. Link-local networking can allow communication on the local link in some circumstances, but it usually does not provide the gateway and DNS settings needed for ordinary internet access. The address is a clue to investigate, not proof of one particular failure.
IPv6 link-local addresses begin with the prefix fe80::/10 and are present on IPv6-capable interfaces for communication on the local link. They are not global internet addresses. A globally usable IPv6 address generally comes from a prefix routed by the network, but whether a device can reach the internet also depends on routing and firewall policy. An address alone does not guarantee connectivity.
Changing or Setting an Address
The correct way to configure an address depends on the distribution, network manager, and whether the connection is temporary or persistent. NetworkManager is common on desktop Linux and many servers; other systems may use systemd-networkd, Netplan, distribution-specific tools, or manually maintained configuration. Editing an unrelated file may have no effect if another service controls the interface.
For a temporary test, the ip command can add an address to an interface, but that change generally does not survive a reboot or a network manager reconfiguration. Persistent configuration should be made through the tool that owns the connection. On a managed network, ask the administrator before choosing a static address; an address already leased to another device can create intermittent failures for both.
Before setting a static address, confirm the subnet and prefix length, select an unused address approved for that network, identify the correct gateway, and use valid DNS servers. On a home router, a DHCP reservation is often a simpler way to keep a device at a predictable address: the router associates a chosen address with the device’s network identity while continuing to manage the network centrally.
Common Problems and Useful Checks
If Linux appears to have no address, first check whether the interface is present and up with ip link, then inspect it with ip address. A disconnected cable, disabled Wi-Fi, airplane mode, a missing driver, or an inactive connection profile can prevent configuration. For DHCP, confirm that the device is connected to the intended network and that the router or server is operating.
If a device can reach other machines on the local network but not the internet, check ip route for a default route. If the route exists, the gateway may still be unreachable or upstream connectivity may be down. If access by IP works but names such as a website hostname do not, investigate DNS rather than changing the IP address. These tests separate different layers of a network problem.
VPNs, containers, virtual machines, and cloud environments can add interfaces and routes. A VPN may install a more specific route or a new default route; containers often use private addresses on virtual bridges. Thus the first address printed by a summary command is not necessarily the address relevant to a particular connection. Check the interface and route associated with the traffic you are troubleshooting.
Frequently Asked Questions
Is 127.0.0.1 the default IP address of Linux?
It is Linux’s IPv4 loopback address, used by the computer to address itself. It is not the usual LAN address that another computer uses to reach it. The IPv6 loopback equivalent is ::1.
How do I find my Linux computer’s local IP address?
Run ip address and find the active Ethernet or Wi-Fi interface. Its IPv4 address appears after inet; IPv6 addresses appear after inet6. The lo interface is loopback, not the LAN connection.
How do I find the default gateway in Linux?
Run ip route for IPv4. A line beginning with default via identifies the next-hop gateway and the interface used. Use ip -6 route to inspect IPv6 routes.
Why does my Linux address start with 169.254?
That is an IPv4 link-local address. It can appear when the interface does not receive normal DHCP configuration. Check the connection, DHCP service, and network settings; the address by itself does not identify the underlying cause.
Is my Linux IP address the same as my public IP?
Usually not on a home network. Linux commonly has a private LAN address, while the router uses a public address for internet communication. A VPN or other network setup can change what remote services see.
Practical Takeaway
There is no built-in, universal Linux default IP address to memorize. The address depends on the interface, network, and configuration method. Use ip address to identify assigned addresses and ip route to find the default gateway; then distinguish local, loopback, link-local, and public addressing before changing settings. That approach gives a reliable answer for the specific Linux machine and network in front of you.