This wikiHow teaches you how to view your private and public IP addresses on a Linux computer.
Step
Method 1 of 2: Finding Private IP Address
Step 1. Understand the right time to use this method
If you want to find your computer's IP address over your own WiFi network (eg when you want to forward your router to your computer), you'll need to know the private IP address.
![Check the IP Address in Linux Step 2 Check the IP Address in Linux Step 2](https://i.how-what-advice.com/images/009/image-25279-1-j.webp)
Step 2. Open Terminal
Click or double-click the Terminal program icon, or press the keyboard shortcut Ctrl+Alt+T to display the Terminal window.
![Check the IP Address in Linux Step 3 Check the IP Address in Linux Step 3](https://i.how-what-advice.com/images/009/image-25279-2-j.webp)
Step 3. Enter the “Show IP” command
Type ifconfig into the Terminal window. Some other commands you can try are:
- ip addr
- ip a
![Check the IP Address in Linux Step 4 Check the IP Address in Linux Step 4](https://i.how-what-advice.com/images/009/image-25279-3-j.webp)
Step 4. Press Enter key
After that, the command will be executed and the IP address information of any devices connected in the network (including your computer) will be displayed.
![Check the IP Address in Linux Step 5 Check the IP Address in Linux Step 5](https://i.how-what-advice.com/images/009/image-25279-4-j.webp)
Step 5. Find your computer title
You can usually find your computer's private IP address information under the " wlo1 " (or " wlan0 ") heading, to the right of the " inet " tag.
![Check the IP Address in Linux Step 6 Check the IP Address in Linux Step 6](https://i.how-what-advice.com/images/009/image-25279-5-j.webp)
Step 6. View the computer's private IP address
The IPv4 address is to the right of the " inet " marker. This is the private IP address of the computer on the currently connected network.
You can usually see the IPv6 address next to the " inet6 " marker. IPv6 addresses are typically used less frequently than IPv4 addresses
![Check the IP Address in Linux Step 7 Check the IP Address in Linux Step 7](https://i.how-what-advice.com/images/009/image-25279-6-j.webp)
Step 7. Try the command " hostname"
On some versions of Linux (eg Ubuntu), you can display your computer's IP address by typing hostname -I (uppercase "i" instead of lowercase "L") and pressing Enter.
Method 2 of 2: Finding a Public IP Address
Step 1. Understand when this method needs to be followed
A public IP address is the address that websites and services see when you access them from your computer. If you want to contact a computer via a remote connection on a different network, you need a public IP address.
![Check the IP Address in Linux Step 9 Check the IP Address in Linux Step 9](https://i.how-what-advice.com/images/009/image-25279-7-j.webp)
Step 2. Open Terminal
Click or double-click the Terminal program icon, or press the keyboard shortcut Ctrl+Alt+T to display the Terminal window.
![Check the IP Address in Linux Step 10 Check the IP Address in Linux Step 10](https://i.how-what-advice.com/images/009/image-25279-8-j.webp)
Step 3. Enter the public IP address display command
Type curl ifconfig.me into the Terminal window. This command serves to retrieve the public IP address of the website.
![Check the IP Address in Linux Step 11 Check the IP Address in Linux Step 11](https://i.how-what-advice.com/images/009/image-25279-9-j.webp)
Step 4. Press Enter key
The command will be executed immediately.
![Check the IP Address in Linux Step 12 Check the IP Address in Linux Step 12](https://i.how-what-advice.com/images/009/image-25279-10-j.webp)
Step 5. Wait for your public IP address to be displayed
The IP address displayed under the command you entered is the public IP address for your network.