You might have used ifconfig command on your linux terminal to know different network configurations of your system.
ifconfig command shows hardware address(HWaddr) and network address(inet addr) for Ethernet or your wifi connection.
ifconfig command don’t show your public IP address(if public and private are different). For that purpose, you can simple type in google search : what is my ip address, it will show your public IP address.
On linux terminal, you can use following commands to know your IP addresses:
Public IP :
curl ifconfig.me or curl ipinfo.io/ip
Private IP :
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Private and Public IP addresses
- What is the difference between public, private, and protected in PHP?
- Difference between Private key and Public key
- Program to find Class, Broadcast and Network addresses
- Interfacing 8155 I/O ports and 8279 with multiple Addresses
- Are Gmail Addresses Case Sensitive?
- Public Key Encryption
- HTTP headers | Public-Key-Pins
- HTTP headers | Public-Key-Pins-Report-Only
- Juice Jacking - Public USB charging ports are not secure
- Types of Virtual Private Network (VPN) and its Protocols
- Difference Between Virtual Private Network (VPN) and Proxy
- Difference between Virtual Private Network (VPN) and Multi-Protocol Label Switching (MPLS)
- Private Methods in Java 9 Interfaces
- Private VLAN
- Private Browsing
- Port Address Translation (PAT) mapping to Private IPs
- What is APIPA (Automatic Private IP Addressing)?
- Private Branch Exchange (PBX)
- All you need to know about Network Neutrality
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.