How to check if there is a process listening on a port in linux

It can often hap­pen that some process is already run­ning on a port, and maybe you want to know what that process is so that you may kill it if it no longer required. Assum­ing that PORTNUM is the port that you are inter­ested in, run the fol­low­ing command

netstat -plunt | grep :PORTNUM

NOTE: plunt is not a word, I just jum­bled the sin­gle char­ac­ter options to make it easy to remember 😛


Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.

You may also like...