How to find my machine's IP address?
computer-networks
Feb 7, 2025 at 10:00 am
An IP address is a unique identifier that is used to locate/identify any device on a network. There are two types of IP addresses :
I have been learning Computer Networking and Socket Programming lately, and I need the IP address of my machine(MacOS/Linux) to test my programs, so I figured it out.
ifconfig | grep inetIn the above command, we pipe the networking details of the machine returned by ifconfig command into grep to obtain IPv4 and IPv6 address of the machine.
I'm definitely not going to attach the output screenshot here and reveal my machine's network configs.
xd.