How to Find the IP Address of a Computer using Linux


In this article, we show how to find the ip address of your computer or another computer using linux.

The ip address of a computer is the identifier that uniquely identifies a computer on the internet.

An ip address is simlar to a street address for a house. A street uniquely identifies a house in the world by the corresponding house number, street number, city, state, country, etc.

In the same way, an IP address is a unique identifier that identifies a computer on the internet that either acts as a server or a client.

IP addresses is how computers communicate on the internet.

Let's say you have a computer connected to the internet and you're looking at a web page, say for Your computer at your IP address is communicating with the ip address of duckduckgo, requesting various search results and information. is able to communicate with you through the Internet Protocol because you have an IP address it can communicate with.

So how can you know what your IP address is for the computer you're working with?

One way to find out your computer's IP address is through linux.

If you open up a linux command line and type in, ifconfig, it will reveal to you your computer's unique IP address.

So below is this is being done on the Kali linux distribution. However, it can be done on really any linux distribution such as ubuntu or anything else.

Finding the IP address of your computer with linux

So above you see the ip address of the computer I am working with is ,

IP addresses are composed of up to 12 numbers but may have less in the general format of XXX.XXX.XXX.XXX, where each XXX may vary in value from 1 to 255

The equivalent command of ifconfig in linux is ipconfig in Windows.

Knowing the ip address of your computer can be very useful when working with the networks and the internet general.

Keep in mind, however, that depending on the configuration of your network, the IP address may change from day to day. You may run ifconfig on linux and get another IP address at a different time. It's not necessarily fixed. So if you need your most current IP address, it's always best to check your IP address at the current time.

This shows how to get the IP address of your own computer and your own network.

If you want to obtain the IP address of another computer or another network through the internet, you can use the ping command.

The ping command is a command that seeks the response of another network. The ping command transmits packets and seeks a response in return. This checks to see whether these 2 computers, or networks, can successfully communicate with each other.

As an example, let's take this website,

If we send the ping command to learningaboutelectronics, its IP address will be revealed.

Finding the IP address of a computer in linux

You can see that the IP address of the network computers hosting the website is

Keep in mind that this may change based on you running this command, because the company that hosts this site, godaddy, has servers all over geographically and may serve this website on another machine based on your location to give you the fastest download time, etc.

So this is how you can find the IP address of your computer or another computer in linux.

Related Resources

How to Get the Current Working Directory in Linux

How to Create a New File in Linux

How to Retrieve the Contents of a File in Linux

How to Delete a File in Linux

How to Delete a Directory in Linux

How to List Hidden Files in Linux

How to Rename a File or Directory in Linux

How to Determine the File Type of a File in Linux

HTML Comment Box is loading comments...