How to Check the IP Address in Linux
This wikiHow teaches you how to view your computer's private and public IP addresses on a Linux computer. Understand when to use this method. The public IP address is what websites and services see when you access them from your computer....
Method 1 of 2:
Finding Your Public IP Address
-
How to Check the IP Address in Linux Picture 1
Understand when to use this method. The public IP address is what websites and services see when you access them from your computer. If you want to try to connect to your computer via a remote connection that isn't on the same network, you'll need the public IP address. -
How to Check the IP Address in Linux Picture 2
Open Terminal. Click or double-click the Terminal app icon, or press Ctrl+Alt+T to bring up the Terminal window. -
How to Check the IP Address in Linux Picture 3
Enter the public IP command. Type curl ifconfig.me into the Terminal window. This command retrieves your public IP address from a website.[1] -
How to Check the IP Address in Linux Picture 4
Press ↵ Enter. Doing so runs the command. -
How to Check the IP Address in Linux Picture 5
Wait for your public IP address to appear. The IP address that appears below the command you entered is the public IP address for your network.
Method 2 of 2:
Finding Your Private IP Address
-
How to Check the IP Address in Linux Picture 6
Understand when to use this method. If you're trying to find the IP address of your computer within your Wi-Fi network (e.g., if you want to forward your router for your computer), you'll need to know the IP address. -
How to Check the IP Address in Linux Picture 7
Open Terminal. Click or double-click the Terminal app icon, or press Ctrl+Alt+T to bring up the Terminal window. -
How to Check the IP Address in Linux Picture 8
Enter the "Show IP" command. Type ifconfig into the Terminal window. Other commands you can try include the following:- ip addr
- ip a
-
How to Check the IP Address in Linux Picture 9
Press ↵ Enter. Doing so runs your command and displays the IP address information of any network items, including your computer. -
How to Check the IP Address in Linux Picture 10
Find your computer's heading. You'll usually find your computer's information under the "wlo1" (or "wlan0") heading, just right of the "inet" tag.[2] -
How to Check the IP Address in Linux Picture 11
Review the private IP address. The IPv4 address is to the right of the "inet" tag. This is the IP address of your computer on your current network.- You can usually see the IPv6 address next to the "inet6" tag. The IPv6 address is less commonly used than the IPv4 address.
-
How to Check the IP Address in Linux Picture 12
Try the "hostname" command. On some Linux versions, such as Ubuntu, you can bring up your computer's IP address by typing in hostname -I (that's a capital "i", not a lower-case "L") and pressing ↵ Enter.
3.3 ★ | 4 Vote
You should read it
- Learn about Public IP address
- How to Change Your IP Address (Windows)
- Learn 193.168.0.1: IP address of broadband router
- Link this website to friends, you will know their address via the computer's IP
- How to Change IP Address on Windows
- How to view the IP address, check the computer's IP
- Learn about NAT configuration (part 2)
- How to Refresh IP Address
- Find out IP Router address 192.168.1.254
- How does Dynamic NAT (dynamic NAT) and Overloading NAT work? (Part 3)
- What is an IP address?
- How to fix IP 169 address error