To kill the process using port kill `netstat -nlp | grep 8080 | awk '{print $7}' | cut -d/ -f1` To get public ip address using command line curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'