Output of Private IP Address Nice trick to show private address of linux machine | Isolated. Baship route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}' Output Public IP address Baship route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p' or even better Bashcurl ifconfig.io