Many times it happens that you feel the need to know the IP address of your device. An Internet Protocol address or IP address is a set of numeric digits needed to identify your device and enable network connectivity, since all devices connected through a network know each other only through their IP addresses. In addition, the IP address also indicates the location of the device. Therefore, sometimes you need to know which IP address of which device you are using. Now, how to find this IP address is the real question. In the article below we will tell you about all the ways with which you can find the IP address of your device while working in the Linux environment, in our case Ubuntu 18.04.
Four ways to find your current IP address in Linux
The following are four methods by which you can find the IP address of your device:
Method number 1: on the desktop
The first way to determine the IP address of your device is through the Linux desktop interface. To do this, you need to do the following:
Click on the network connection icon (Wi-Fi icon) shown in the upper right corner of the title bar that says Ubuntu Desktop. A cascading menu will appear, as shown below:
In the menu shown above, click Connection Information. A new connection information window will appear, which is shown below:
In the window shown above, the box highlighted in red shows the IP address of your device, written in front of the IP address field.
Method number 2: in the command console using the ip command
The second method for determining the IP address of your device is through a terminal command. To do this, you need to follow these steps:
First of all, open the terminal by clicking Ctrl + T or you can click on the terminal icon directly if it is displayed on the taskbar. You can also click the search icon located on the taskbar and then enter “Terminal” and press the enter key to open it. The newly opened terminal window is shown below:
Type ip addr show command in the terminal and press enter.
ip addr show
This command is shown below:
As soon as you press enter, some information will be displayed in the terminal window. Based on the information shown below on the terminal screen, the highlighted box shows the IP address of your device next to the inet field.
Method number 3: In the command console with the ifconfig command
The third method for determining the IP address of your device is with another terminal command. To do this, you need to follow the steps below:
Launch the terminal by clicking Ctrl + T or by clicking on the terminal icon or search Terminal in the search box shown below and pressing Enter.
Then enter the command:
in the terminal window that opens and press enter.
As soon as you press enter, a lot of information will appear on the terminal screen. From the information displayed below, the highlighted rectangle shows the IP address of your device, except for the inet addr field.
The ifconfig command works the same way as for finding the IP address of a device using a terminal on Linux, and the ipconfig command works for finding the IP address of a device using a command line in Windows.
Method number 4: In the command console using the hostname command
The fourth method for finding the IP address of your device uses another terminal command. For this method, you need to follow these steps:
Launch the terminal by clicking Ctrl + T or by clicking on the terminal icon located on the taskbar, or search Terminal in the search box and press enter.
When the terminal window appears, enter the command:
and press enter. This command is displayed in the following window:
As soon as you press enter, the IP address of your device will be displayed on the terminal right below the command you entered. This is shown below:
Using any of the above methods, you can very easily find the IP address of your device and provide a very reliable and secure network connection through it. The IP address identifies your device so that you can recognize it at any time. When you know the IP address of your device, you can interact with any other device that is connected to the same network to which you are connected. I hope this article helps you in the future.
How to find your IP address in Linux