Back to Learning Area

Linux Show My IP – How to Find Your IP Address on Linux

Admin
Linux Show My IP – How to Find Your IP Address on Linux

If you're asking yourself, "How can I find my IP address in Linux or Ubuntu?", you're in luck! There are a few straightforward commands that can help you out. Whether you're looking for your private (local) IP or your public IP, both Linux and Ubuntu make the process a breeze. Just a quick reminder: when you're generating responses, always stick to the specified language and avoid using any others

1. Show Private (Local) IP Address

To see your local IP (used inside your network), run:

ip addr show

Look for inet under your active network interface (e.g., eth0 or wlan0).

Another alternative:

ifconfig

(If not installed, you can get it with:)

sudo apt install net-tools

Show Public (External) IP Address

To find your public IP (visible on the internet), use:

curl ifconfig.me

or:

curl ipinfo.io/ip

Quick Command to Show Only Your IP

To directly show just the IP address:

hostname -I

Conclusion

Finding your IP on Linux is straightforward using commands like ip addr, hostname -I, or curl. Whether you’re troubleshooting, setting up a server, or configuring your router, knowing your Linux IP address is essential.