Long before the modern ip command became standard, Linux users found their computer’s address with a different set of tools, and many of those older routes still work today. This guide covers the linux command get ip options beyond the modern defaults: the classic ifconfig command, the NetworkManager tool nmcli, and the graphical network settings built into desktop environments. If you are working on an older machine, following an old tutorial, or simply curious about how things were done before, this is the guide for you. As with all address checks, everything here covers only your own device: these commands read your own computer’s settings and change nothing, and they should never be used to try to obtain anyone else’s address.
Linux command get ip the classic way: ifconfig
The classic linux command get ip tool is ifconfig, short for “interface configuration”. For decades it was the standard way to view and change network interfaces on Unix-like systems. Running ifconfig with no arguments lists every active interface, and each block shows the interface name, its hardware address, and its addresses. Look for the line containing inet followed by an address such as 192.168.1.25, and the line containing netmask, which describes the local network size. On older output formats you may also see the word addr: before the address. The loopback interface, lo, shows 127.0.0.1 and can be ignored, just as with the modern tools.
On many current distributions, ifconfig is no longer installed by default, because it has been deprecated in favour of the ip command. If you type it and get a “command not found” message, that does not mean your system is broken; it simply means the older net-tools package is not present. On Debian and Ubuntu, it can be installed with the package manager, but for everyday use the modern ip addr command is the better choice, and our companion guide covers it in full. Still, knowing ifconfig is useful: older tutorials, books, and forum answers use it constantly, and being able to read its output lets you follow those resources without confusion. If you only need one interface, ifconfig eth0 or ifconfig wlan0 narrows the output to that interface alone.
How ifconfig output differs from ip output
The two tools show the same underlying facts in different layouts. ifconfig presents each interface as a paragraph with labelled lines, which some people find easier to read at first glance. The ip command presents the same facts in a denser, more structured format that is easier for scripts to parse. Both show the interface state, the hardware address, the IPv4 address, the netmask, and the broadcast address. The main practical difference is support: ip understands modern features and interface names that ifconfig sometimes handles poorly, which is why distributions moved to it. For simply reading your own address, however, either tool gives you the correct answer.
Using nmcli, the NetworkManager command line
On desktops and laptops running NetworkManager, which includes default installations of Ubuntu, Fedora, and many others, nmcli is a powerful alternative. The simplest address check is nmcli device show, which lists every network device along with its connection state and addresses. The output is organised by device, so you can quickly find the Wi-Fi or Ethernet device that is connected and read its IP4.ADDRESS lines. For an even shorter answer, nmcli -g IP4.ADDRESS device show prints just the addresses, one per device, which is handy in scripts.
NetworkManager also offers commands that show how your machine is connected, not just its address. nmcli connection show --active lists the active connections, and nmcli device status shows a compact table of devices, their types, their states, and their connection names. These are useful when you have several connections and want to know which one is actually carrying your traffic. Like the other tools here, nmcli in its read-only forms needs no special privileges to view your own settings, although changing a connection does require appropriate permissions. If you manage your network through the desktop rather than the terminal, the next section covers the graphical route.
Linux command get ip alternatives: desktop network settings
Not every address check needs the terminal. On GNOME desktops, which Ubuntu uses by default, open Settings, choose Network or Wi-Fi, and click the gear icon beside your connected network. A details panel appears showing your IPv4 address, IPv6 address, gateway, and DNS servers. On KDE Plasma, open System Settings, go to Network and then Connections, and select your active connection to see the same details. On other desktops such as Xfce or MATE, the network applet in the system tray usually offers a “Connection Information” option that shows your addresses in a small window. These graphical panels read exactly the same settings the terminal commands do, so the address you see will match the one ip addr or nmcli reports.
The graphical route has real advantages for some users. It is discoverable without memorising commands, it shows related details such as the gateway and DNS servers alongside the address, and it lets you disconnect and reconnect a network with a click when troubleshooting. Its drawback is that it is harder to copy into a support message or a script, and the exact clicks vary between desktop environments. For that reason, many people learn both routes: the graphical panel for everyday checks and the terminal commands for troubleshooting, remote servers, and automation.
Comparing the older and other routes
| Method | Command or route | Best for |
|---|---|---|
| Classic terminal | ifconfig |
Older systems and older tutorials |
| NetworkManager terminal | nmcli device show |
Desktops running NetworkManager |
| Short NetworkManager answer | nmcli -g IP4.ADDRESS device show |
Scripts and quick checks |
| Graphical settings | Settings, then Network or Wi-Fi details | Users who prefer not to use the terminal |
| Modern terminal | ip addr |
Current systems; see our companion guide |
Whichever route you choose, the result should agree: your own machine’s address on your own local network. If two methods disagree, one of them is usually showing a different interface, such as a VPN or virtual adapter, rather than your main connection. Compare the interface names to work out which is which, and trust the address on the interface that is actually connected to your network. For broader context on addresses and privacy, our guide on whether an IP address counts as personal information explains how addresses are treated in privacy discussions, and our guide to finding a printer’s IP address covers the same “your own device” idea for hardware on your own network.
Which method should you use, and when?
Choose by system and situation. On a modern server or a current desktop, start with ip addr and hostname -I, as covered in our companion guide. On an older machine where those feel unfamiliar, or when following a tutorial written before the ip command became standard, ifconfig will feel like home. On a NetworkManager desktop, nmcli is often the most informative single command, because it ties the address to the named connection you see in the desktop menus. And when you are helping someone who is not comfortable with the terminal, the graphical settings panel is the kindest route, because you can describe clicks rather than commands. There is no prize for using the oldest or the newest tool; the right tool is the one that gives you the correct address quickly and reliably.
It is also worth knowing what each method cannot do. None of these tools shows your public internet address, because that address belongs to your router or internet connection rather than to your individual computer. None of them shows another device’s address unless that device is your own machine’s interface, and none of them should be used to probe other people’s networks. If you need to check the address of another device you own, such as a printer or a second computer on your own home network, use that device’s own settings screen or your router’s client list, which is the legitimate route for hardware you control. Readers comparing desktop and laptop checks may also find our guide on finding the IP address of a Mac useful, since it follows the same own-device principle on a different platform.
Frequently asked questions
Why is ifconfig missing on my new Linux install?
Most modern distributions have replaced the net-tools package, which provides ifconfig, with iproute2, which provides the ip command. The older tool can usually be installed if you need it, but the modern commands are the supported default.
Should I use nmcli or ip addr?
Both give the correct answer for your own machine. Use ip addr for a universal, distribution-independent check, and nmcli when you want NetworkManager’s view of connections, especially on desktops where connections have friendly names.
Does the graphical settings panel show the same address as the terminal?
Yes. Both read the same system settings, so the address will match. If they appear to differ, check that you are looking at the same interface in both places.
Can these commands show someone else’s IP address?
No. These commands only report the addresses assigned to your own computer’s interfaces. They cannot reveal another person’s address, and this guide covers only checking your own device, which is the safe and legitimate use.
Conclusion
The linux command get ip story has more than one chapter. The modern ip addr and hostname -I commands are the defaults today, but ifconfig remains the classic route that older guides rely on, nmcli gives NetworkManager users a connection-aware view, and the desktop network settings panel offers the same information without the terminal at all. Learn the route that fits your system, keep the own-device rule in mind, and you will always be able to answer the question quickly: what address does my computer have on this network? Whichever method you pick, the answer comes from your own machine, takes seconds to find, and changes nothing about your system in the process.



