Had an issue today trying to figure out which port to use in order to access a test installation of Atlassian JIRA installed by someone else ages ago. The command was simple:
nmap -sS -O 127.0.0.1
Thanks to http://www.linux-noob.com and the frequent member xDamox who created the post back in 2005.