Linux ps command tutorial

What is ps command

ps(process) command in linux is used to report the active process status.

Syntax of ps command

ps [a][-a] [-A] [-d] [-e]..<options>

Example of ps Command

Output would be

Some Other Common Example

How to find whether java application is listening on IPv4 or IPv6

Step 1 : # First find pid of process


Then execute lsof -i command

Fifth column in the output will show whether its listening on ipv4 or ipv6.


Find files used/opened by a particular process

Step 1 : Find process id


Step 2 : Now execute below command

You will be able to see all files opened by the process.

Know which process is using a particular file.


Output will be process name and process Id. Here 4551 is pid of process.s

2) Know the start time of process


where 3rd column indicates start time sonce.

first process  15612 is running since 5 days 20 hrs 54 mins and 15 secs

Leave A Comment

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