Finding Application / Process Running On Particular Port In Linux Systems
Today, I'm going to show you how to find application / process running on particular port in Linux Systems.
We can use lsof
command to find the process running on particular port. The syntax of lsof command to find the application running on particular port looks like following..
lsof -i :port
Summary of above code...
lsof
command is used to list open files.. and the argument -i is used to list files whose ip address / port matched to specified ip address / port.
Note:
If you ignore ip address / port after -i
then the above command will lists processes for all ip addresses...
For example to find the process / application listening on port 80, run the following code..
lsof -i :80
The output will looks like following..
If you omit port value... lsof -i
the output will looks like following one..
By specifying -t
for lsof
command we can get pid of process listening on particular port... Look at the below command signature..
lsof -t -i :port
If you want to find out pid of process listening on port 80, run the following code..
lsof -t -i :80
The above commands output will looks like..
That's it for now.. If you like don't forget to share it guys.. You can follow us on fb.com/opensourceinside and also subscribe our channel on Youtube..