Tips : Method to Find out IP address of your PC or Laptop in Linux OS

Method to Find IP address of your PC or Laptop in Linux OS. The full form of IP address is Internal Protocol Address. By name itself, it is a set of numerical digit which is used to identify your PC while connecting network with another PC. All the devices that are connected each other through a network are differentiate with their IP address only. IP address also specifies your PC or Laptop location. So before further proceeding to main theme of this article, we will know about what is IP address and how its numerical digit meaning.

Categories and Types of IP Address

There are two categories of IP (Internal Protocol) address. These are private and public. You find Private IP addresses provided by your WiFi box (and company intranet) provider. They are in the range of 10.x.x. x172.16.x.x-172.31.x.x, and 192.168.x.x, where x=0 to 255. However, Public IP addresses, by name itself, are “public” and you can find them from anywhere in the world. Each website has a unique IP address that can be reached by anyone and from anywhere; that is considered a public IP address.

find ip address in linux ubuntu

There are two types of IP addresses: IPv4 and IPv6. IPv4 addresses have the format x.x.x.x, where x=0 to 255. There are 2^32 (approximately 4 billion) possible IPv4 addresses. IPv6 addresses consisting hex numbers. The total number of bits is 128, which means there are 2^128—340 undecillion!—possible IPv6 addresses. IPv6 was launched to tackle the foreseeable exhaustion of IPv4 addresses in the near future. In this article, we will tell discuss all the ways through which you can find the IP address of your device while working in Linux OS.

How to Find IP address of your PC or Laptop in Linux OS

you may find IP address and details network information by following methods in Linux OS (Ubuntu or Redhat version) or Unix.

Ways-1 : Through Command Prompt

  • At first, the computer must be login from Administrator or Root account.
  • Open LINUX  or Unix Shell under GUI mode.
  • Type command “ipconfig eth0” on command prompt.
  • Press Enter button.
  • It will show network information details.

ip address in linux or ubuntu

Ways-2 : Find IP address through Linux Desktop

The first method of finding the IP address of your device is through the Linux desktop interface. For this, you need to proceed as follows:

  • Click on your network connection icon (Wi-Fi icon) shown at the top right of the title bar on which Ubuntu Desktop is written. (If another linux distribution system, then it will different desktop)
  • A cascading menu will appear here.
  • From the menu appeared on your screen, click on Connection Information.
  • A new Connection Information window will appear, in which you will find IP address of your PC or Laptop.

Ways-3: Through IP Command

The second method of finding the IP address of your device is through a terminal command. In order to do this, you need to perform the following steps:

  • At first, open terminal by pressing Ctrl+ T.
  • You can also click on the terminal icon directly if it is shown on your task bar.
  • You can also click on the search icon located on the taskbar.
  • Then type Terminal and press enter to open it.
  • The terminal window will appear on your Computer or laptop screen.
  • Type the command ip addr show in the terminal and press enter.
     ip addr show
  • Now, press enter.
  • Some information will be displayed on the terminal window.
  • The IP address of your system is under white rectangular highlighted bracket in the terminal screen.

Tips : Method to Find out IP address of your PC or Laptop in Linux OS

Ways-4 : Find IP address in Linux OS from the Shell with ifconfig Command

  • Open terminal by pressing Ctrl+ T .
  • or clicking on the terminal icon
  • or searching for terminal in the search window
  • Press enter.
  • Then type the command in the newly opened terminal window and press enter.:
      /sbin/ifconfig
  • Now various information will display on the terminal screen.
  • From the displayed information below, the highlighted rectangle shows the IP address of your device besides the field of inet addr.

find ip address in linux ubuntu

Note : The ifconfig command acts in the same way for finding the IP address of a device using terminal in Linux as ipconfig command works for finding the IP address of a device using command prompt in Windows.

Ways-5 : By using Hostname Command

The method four for finding the IP address of your device makes use of yet another terminal command. For this method, you need to follow the following steps:

  • Launch terminal by pressing Ctrl+ T
  • or clicking on the terminal icon located on the taskbar
  • or search for terminal in the search window and press enter.
  • When the terminal window will appear, type the following command:
     hostname -I 
  • Press Enter.
  • The IP address of your device will display on the terminal right below your entered command.

Some Public IP Address Command

The following commands will get you the IP address list to find public IP addresses for your machine:

  1. curl checkip.dyndns.org
  2. curl ident.me
  3. host myip.opendns.com resolver1.opendns.com
  4. curl bot.whatismyipaddress.com
  5. curl ifconfig.me
  6. dig +short myip.opendns.com@resolver1.opendns.com
  7. curl -4/-6 icanhazip.com
  8. curl ipinfo.io/ip

Some Private IP Address Command

The following commands will get you the private IP address of your interfaces:

  1. ifconfig -a
  2. ip addr (ip a)
  3. hostname -I / awk ‘{print $1}’
  4. ip route get 1.2.3.4 / awk ‘{print $7}’
  5. (Fedora) Wifi-settings 
  6. nmcli -p device show

IP (Internal Protocol) address is a important part of any communication when two or more PC connected each other. You can identify your PC by IP address. IP address also help to make wifi connection or any public or private connection.

Thanx…

3 thoughts on “Tips : Method to Find out IP address of your PC or Laptop in Linux OS

Leave a Reply

Your email address will not be published. Required fields are marked *