How to Check IP Address on Linux

This article shows you how to view the private and public IP addresses of computers using the Linux operating system.

Find your public IP address

images 1 of How to Check IP Address on Linux
Images 1 of How to Check IP Address on Linux

Know when to use this method. A public IP address is information that websites and services see when you access it from your computer. If you want to connect to a computer via a remote connection that is not on the same network, you need a public IP address.

images 2 of How to Check IP Address on Linux
Images 2 of How to Check IP Address on Linux

Open Terminal. Double-click the Terminal application icon or press the Ctrl+ Alt+ key combination Tto open the Terminal window.

images 3 of How to Check IP Address on Linux
Images 3 of How to Check IP Address on Linux

Enter the public IP command. You will enter the command curl ifconfig.meinto the Terminal window. This is a command that gets your public IP address from a website.

images 4 of How to Check IP Address on Linux
Images 4 of How to Check IP Address on Linux

Press ↵ Enter. This deploys the command.

images 5 of How to Check IP Address on Linux
Images 5 of How to Check IP Address on Linux

Wait for your public IP address to appear. The IP address shown below the command you entered is the public IP address for your network.

Find your private IP address

images 6 of How to Check IP Address on Linux
Images 6 of How to Check IP Address on Linux

Know when to use this method. If you want to find the IP address of a computer on a Wi-Fi network (such as when you want to forward a router to a computer), you will need to know the private IP address.

images 7 of How to Check IP Address on Linux
Images 7 of How to Check IP Address on Linux

Open Terminal. Click or double-click the Terminal application icon or press the Ctrl+ Alt+ key combination Tto open the Terminal window.

images 8 of How to Check IP Address on Linux
Images 8 of How to Check IP Address on Linux

Enter the "Show IP" command. Enter the command ifconfiginto the Terminal window. Here are a few other commands you can try:

ip addr

ip a

images 9 of How to Check IP Address on Linux
Images 9 of How to Check IP Address on Linux

Press key ↵ Enter. This will execute the command and display IP address information for every device connected to the network, including your computer.

images 10 of How to Check IP Address on Linux
Images 10 of How to Check IP Address on Linux

Find the computer's title. Your computer's information is usually displayed under the "wlo1" (or "wlan0") heading, just to the right of the "inet" tag.

images 11 of How to Check IP Address on Linux
Images 11 of How to Check IP Address on Linux

View private IP address information. The IPv4 address appears to the right of the "inet" tag. This is the IP address of the computer on your current network.

You can see the IPv6 address next to the "inet6" tag. IPv6 addresses are less used than IPv4 addresses.

images 12 of How to Check IP Address on Linux
Images 12 of How to Check IP Address on Linux

Try the "hostname" command. On some versions of Linux, such as Ubuntu, you can see your computer's IP address by entering the command hostname -I(this is a capital "i", not a lowercase "L") and pressing the key ↵ Enter.

4 | 1 Vote
« PREV : How to Uninstall...
How to Sign in to... : NEXT »