How to Find IP Address in Linux

0
473
How to Find IP Address in Linux

An IP address is a code name assigned to a computer on a network. It is like a postal address. It ensures that the network traffic is sent to the correct computer. In this tutorial you’ll learn how to find your computer’s private and public IP Address on a Linux computer.

1Public IP Address

What is a Public IP Address?

A public IP address is the address which is assigned to a computer to allow direct access over the Internet. A public IP address is globally unique. It can be only assigned to a unique device.

How to Check the Public IP Address in Linux?

Follow these steps to retrieve the Public IP Address.

  • Press Ctrl + Alt + T or double click on the Terminal App Icon to open the terminal window.
  • Type the following command in the terminal window.

curl ifconfig.me

  • This will retrieve your public IP Address.
  • You’ll see an IP Address appear below the command you entered. It is the public IP Address of your network.

 

2Private IP address

What is a Public IP Address?

A private IP address is the address space allocated to allow organizations to create their own private network. The tablets, smart phones and computers within your home or within an organization typically assigned private IP addresses so that the local devices see and communicate with them via these private IP Addresses.

How to Check the Private IP Address in Linux?

Follow these steps to retrieve your Private IP Address.

Using the ifconfig Command

  • Press Ctrl + Alt + T or double click on the Terminal App Icon to open the terminal window.
  • Type the following command In the terminal window.

 ifconfig

  • The system will display all network connections. This includes connected, disconnected, and virtual networks. You can find your IP Address under the one labeled UP, BROADCAST, RUNNING, MULTICAST.
  • Please note that if you notice the term loopback while you are checking your IP address, this refers to an IP address that returns traffic to the same computer. Typically, the loopback address is 127.0.0.1. If you see this address, most probably you may not connect to the network.

Using the hostname Command

  • Press Ctrl + Alt + T or double click on the Terminal App Icon to open the terminal window.
  • Type the following command In the terminal window.

hostname –I

  • The system will display your Private IP address.

Using the ip addr Command

  • Press Ctrl + Alt + T or double click on the Terminal App Icon to open the terminal window.
  • Type the following command in the terminal window.

ip addr

  • You can see your IP Address below the entry that says link/ether.

Find Your IP Address in Linux with a GUI

Follow these steps to  find your IP Address using Linux GUI.

  • Go to the Application menu.
  • Type Settings in Search Bar
  • In the search results click on the Settings icon.
  • In the Settings Menu, you’ll see the Network tab
  • Click on the Advanced Wired Settings icon.
  • A new popup window will be displayed.
  • There you can find both IPv4 and IPv6 address.

LEAVE A REPLY

Please enter your comment!
Please enter your name here