xxxxxxxxxx
ip route get 8.8.8.8 | awk -F"src " 'NR==1{split($2,a," ");print a[1]}'
ip route get 8.8.8.8 | awk 'match($0,/src (\S*)/,a)&&$0=a[1]'
ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++)if($i~/src/)$0=$(i+1)}NR==1'
ip route get 8.8.8.8 | sed -E 's/.*src (\S+) .*/\1/;t;d'
ip route get 8.8.8.8 | sed 's/.*src \([^ ]*\).*/\1/;t;d'
ip route get 8.8.8.8 | sed -nE '1{s/.*?src (\S+) .*/\1/;p}'
ip route get 8.8.8.8 | grep -oP 'src \K[^ ]+'
10.36.15.150
xxxxxxxxxx
Always make sure not to give your public IP address to anyone who you DON'T trust
xxxxxxxxxx
# Get your ip public
curl ipinfo.io/ip
# More specific
curl ipinfo.io/{param}
# Param-List:
# ip
# hostname
# city
# region
# loc
# org
# country
# timezone
xxxxxxxxxx
Only Share This if you are hosting a server or something and you know what ur doing.
xxxxxxxxxx
Be sure you know what you're doing when giving this info to people. they can find lots of details with it.
xxxxxxxxxx
Never Share your "IP address" to anyone,
it can be used to access your Device and data.
to see ip using command(Windows)
//See your internal ip on any windows
Search -> Write:cmd-> command <ipconfig>
foc Mac OS
1- command <ipconfig getifaddr en1> For wired connections, enter into the Terminal and your local IP will appear.
2- command <ipconfig getifaddr en0> For Wi-Fi, enter and your local IP will appear.