How do I find my IP in terminal?

How do I find my IP in terminal?
Answer
For wired connections,
enter ipconfig getifaddr en1 into the Terminal and your local IP will appear. For Wi-Fi, enter ipconfig getifaddr en0 and your local IP will appear. You can also see your public IP address in the Terminal: just type curl ifconfig.me and your public IP will pop up.
 

Tìm kiếm

Back
Top