Contact Form

Name

Email *

Message *

Cari Blog Ini

Macos Terminal Get Current Ip

How to find your IP address on a Mac

Find your external IP address

To find your external IP address, you can use a service like Can You See Me or What Is My IP Address. These services will show you your IP address as seen from the internet.

You can also use the ifconfig command in Terminal. To do this, open Terminal and type the following command:

ifconfig

This will print out a list of your network interfaces. Your external IP address will be listed next to the interface that is connected to the internet.

Find your internal IP address

To find your internal IP address, you can use the following command in Terminal:

ifconfig en0 | grep inet | grep -v inet6

This will print out your internal IP address.

Use a shortcut

You can also use a shortcut to find your IP address. To do this, open the Shortcuts app and create a new shortcut. Add the following actions to the shortcut:

  1. Get Location
  2. Echo

Set the Echo action to output the value of the Latitude and Longitude variables. This will print out your current location, including your IP address.


Comments