Checking Which Ports Are Doing What On Linux

From time to time it’s handy to be able to see exactly which process is using a particular port on a Linux system – especially if you’re debugging issues.

This command will let you see exactly what’s going on – you simply change the port number:

lsof -i:80

If you need the standard port numbers you can check this list

By Michele Neylon

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight.

2 comments

  1. Nice tip.. a good variant to that would be:
    watch lsof -n -i:80
    This will update every 2 seconds (the default for the watch command), I’ve included the “-n” for lsof to disable DNS lookups, it could cause display issues with watch on it’s default update times.
    If you’re not familiar with the “watch” command, check it out, very useful!

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version