How to Check IP Address on Linux: 12 Steps (with Pictures)

Table of contents:

How to Check IP Address on Linux: 12 Steps (with Pictures)
How to Check IP Address on Linux: 12 Steps (with Pictures)

Video: How to Check IP Address on Linux: 12 Steps (with Pictures)

Video: How to Check IP Address on Linux: 12 Steps (with Pictures)
Video: How to Search for Someone in Skype - Look Somebody Up on a Skype Mobile App 2024, November
Anonim

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

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

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

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

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

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

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

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

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

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

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.

Tips

A private IP address is the number assigned to a computer in a private wireless network, while a public IP address is the address assigned to your network

Recommended: