What does top do?

show a live, sorted view of running processes.

▸ Explain your own top command →

top examples, explained

$ top

  • topshow a live, sorted view of running processes

$ top -b -n 1

  • topshow a live, sorted view of running processes
  • -bbatch mode — plain output for logs or pipes
  • -nexit after this many refreshes
  • 1value for -n

top flags & options

-dset the refresh delay in seconds
-nexit after this many refreshes
-pmonitor only these process IDs
-ushow only this user's processes
-bbatch mode — plain output for logs or pipes
-ihide idle processes

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.