title: Find out the port a specific service is using
body: <p>Can anybody help me with using nmap? I don't quite get it when it comes to find out which port a specific server is running on. </p>
  
  <p>To exemplify my issue, I have to install the apache2 web server on an Ubuntu OS. Then, I have to start its daemon (no problem, I simply ran "service apache2 start", which, I think, really did the job for me). Now, I just have to figure out on which port this service is running. I read about netstat and nmap, but I don't really know which parameters I should use in order to find out the port. So, my question is : Is there any way to find out the port this service is using? If yes, how could I do that?</p>
  
  <p>Furthermore, if I wanna find out which ports are opened (in "established" or "listening" state) on a specific server, how should I proceed to find out?</p>
  
  <p>Thanks very much in advance.</p>