How to know your public and private IP addresses
You may have used the ifconfig command in your Linux terminal to understand the various network configurations on your system.
The ifconfig command displays the hardware address (HWaddr) and network address (inet addr) for your Ethernet or WiFi connection.
the ifconfig command does not display your public IP address (if public and private are different). To do this you can simply do a google search: what is my IP address, it will show you your public IP address.
In a Linux terminal, you can use the following command to find out your IP address:
public IP:
curl ifconfig.me or curl ipinfo.io/ip
Private IP :
hostname -I
Comments
Post a Comment