četvrtak, 23. veljače 2012.

Check open ports


$ sudo lsof -Pni4 | grep LISTEN

$ sudo lsof -i -P | grep -i "listen"

or

$ sudo su -

# lsof -Pni4 | grep LISTEN

# lsof -i -P | grep -i "listen"

subota, 18. veljače 2012.

petak, 17. veljače 2012.

Get your external IP address

Get your external IP address

$ $ curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+"

or

$ dig +short myip.opendns.com @resolver1.opendns.com

or

$ curl ip.appspot.com

or

$ sudo apt-get install curl

$ curl ifconfig.me

$ watch -n 1 "netstat -tpanl | grep ESTABLISHED"
Monitor TCP opened connections

How to check Linux version from command line

$ cat /proc/version

Ubuntu / Xubuntu

$ cat /etc/lsb-release

nedjelja, 12. veljače 2012.