how to check IP address in termux

Find IP address using Browser :

IP (internet protocol) every device contain IP address when that device is connected to the internet such as android,mac,windows,Linux,IP-cameras,routers etc. If you want to know your IP address then first turn on mobile data and open up any browser and simply type what is my IP address.Google gives you the result and shows Current IP address.and this is your public IP address assign by your ISP(Internet Service Provider).

Find IP address using Termux :

First turn on your internet connection and open your termux app.Now first update termux using apt update command, after updating termux install curl package by using apt install curl command.Now clear your terminal using clear command.

Find Local and Public IP address in Termux:

To know your local IP address type this command ifconfig
This command will shows your local IP address.

To know your Public IP address, first install curl package. after the installation of curl package type this command curl and hit the enter. This command will shows you your current Public ip address  assign by your ISP.You can use these commands in Ubuntu,Linux etc.