Ping:

Ping is the networking command I use most often. It is used to test if you can reach a device, and if so how quick the connection is. To use this command, you type the word ‘ping’ followed by either a domain (google.com) or an IP address.

image

Ping sends a stream of packets to the location you give it, and waits for a response. After running the command, we can see the response (64 bytes from…), and on the end of the line is the time it has taken to get that response in milliseconds. The ping command will run indefinitely, so to end it you use the keyboard shortcut CTRL+C. You can then get some statistics about the connection. If you don’t have a connection to the device you’re pinging, you will see something like this:

image

Note that ping can also be used to give you an IP address of a domain. After pinging a domain, it will give an IP address. Here I find an IPv6 address after pinging bing.com:

ip address:

This command tells you your local IP address. There’s a lot of information that may not be useful to you however.

(I used my own Kali machine for this, because my tutorial one has too many IPs and the output was cluttered)

image

For a start, we can ignore everything in section 1. This is the loopback interface and while it can be useful for diagnosing connection problems, it doesn’t tell us our IP: for that we need to look at section 2. Your internal IP address is listed under inet (in this case it’s 192.168.129.132), with your IPv6 address listed under inet6.

That is a lot of information to take in, but all you really need to know is that your IP address on your current network is found next to ‘inet’.

Conclusion:

I know this is a very short guide, but these are the two non-hacking networking commands I use most often; they are fundamental and it’s always important to have a solid knowledge of the foundations.