If you want to list all used port on ubuntu server, you can use netstat, example :
netstat -tlnp
Command above will list all port used, t mean tcp, l mean listening port, n mean show numeric, p mean show pid.
Or you can use this helper to explain the command
zuka.one
©2011