nmap is a very useful network exploration tool and security scanner. It can be used to scan all open ports on a host. The following example shows how it can be used. However port scanning is just one of the many features of nmap.

[neo@techpulp ~]# nmap 127.0.0.1

Starting Nmap 4.20 ( http://insecure.org ) at 2008-10-09 12:28 IST
Interesting ports on localhost.localdomain (127.0.0.1):
Not shown: 1692 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
111/tcp  open  rpcbind
631/tcp  open  ipp
904/tcp  open  unknown
8000/tcp open  http-alt

Nmap finished: 1 IP address (1 host up) scanned in 0.292 seconds
[neo@techpulp ~]#