SSH Commands

wooden

For the basics in linux shell

SSH Commands Guide List | Suggest A Guide
HostGeekz Hosting Guides | cPanel | Cheap Domains | Web Hosting Talk

Check ports for processes

If you want to check what process is running on the server on a certain port you can use the lsof command. You can check everything by typing:

lsof

You can also check just a single port and protocol, using port 80 as an example:

lsof -i tcp:80

This will check port 80 on TCP protocol. Here's an example output:

root@server [/]# lsof -i tcp:80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
httpd 3313 root 19u IPv4 8033 TCP *:http (LISTEN)
httpd 25553 nobody 19u IPv4 8033 TCP *:http (LISTEN)
httpd 25554 nobody 19u IPv4 8033 TCP *:http (LISTEN)
httpd 25555 nobody 19u IPv4 8033 TCP *:http (LISTEN)
httpd 25556 nobody 19u IPv4 8033 TCP *:http (LISTEN)
httpd 25557 nobody 19u IPv4 8033 TCP *:http (LISTEN)
httpd 25789 nobody 19u IPv4 8033 TCP *:http (LISTEN)
httpd 26410 nobody 19u IPv4 8033 TCP *:http (LISTEN)
httpd 27622 nobody 19u IPv4 8033 TCP *:http (LISTEN)
httpd 27625 nobody 19u IPv4 8033 TCP *:http (LISTEN)
httpd 28113 nobody 19u IPv4 8033 TCP *:http (LISTEN)


© Copyright, Simplec Services - Australia, 2017

Visit HostGeekz.com For More!
Cheap .Com Domains from $8.50