Use fuser -n tcp
For example to see which application is already using port 80 use:
$ fuser -n tcp 80The netstat command can also be used to determine what process is using a port.
Use netstat -nlp and you should see PID and names of programs along with the port they are using (note you can only see the PID of process you own, unless running as root)
$ netstat --nlp