Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?

share|improve this question
up vote 7 down vote accepted

top is mostly used interactively (try reading man page or pressing "h" while top is running) and ps is designed for non-interactive use (scripts, extracting some information with shell pipelines etc.)

share|improve this answer

top allows you display of process statistics continuously until stopped vs. ps which gives you a single snapshot.

share|improve this answer

top enables you to see your processes ordered by the amount of processor power they use. ps enables you to see all your processes, or just the processes used by certain users, for example root or yourself.

top should be used to see which processes are most active, ps could be used to see which processes you (or any other user) are running currently.

for more information about how to use top and ps, run man top or man ps in your terminal ;)

share|improve this answer

Another point:

ps - Display currently active processes.
top - Display all running processes.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.