Linux Find Out My IP Number ( IP Address )

You can find your IP address in Linux using the following methods:

  1. Using the ip command:
ip addr show | grep 'inet ' | grep -v 127.0.0.1 | awk '{print $2}'

This will show your IP address (or addresses) along with the associated network interfaces.

  1. Using the hostname command:
hostname -I

This will show your IP address (or addresses) assigned to the host.

  1. Using the ifconfig command:
ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{print $2}'

This will show your IP address (or addresses) along with information about your network interfaces.

  1. Using the curl command:
curl ifconfig.me

This will show your public IP address.

Leave a Comment