Search code examples
linuxamazon-web-servicesnetwork-programmingserviceport

how we can see which service run in particular port in Linux using command?


like i want too see on port no. xx:xx which service are running or all port with all service run on any Linux machine it can be possible on local machine as well other machine [ using IP address ] of network in LAN area.


Solution

  • For your local server you can use for example the ss command with the following options: ss -tulpn

    For a remote server, probably you first need to expand or understand what you are trying to achieve: if you need to check all ports exposed to other servers on the network you can use nmap like: nmap -Pn

    Otherwise, if you want the same output of ss for a remote server the best way is to SSH to the other server and launch the ss command from there.