0

So obviously the title says it all. Is this the best way to view my running processes?

ps -u whoami
  • 1
    I don't know, is it? What's "best"? As it stands, your question is entirely a question of opinion and such questions are off topic here. Are you maybe asking for alternatives? Also, that command won't actually work, you meant ps -u $(whoami) – terdon Jun 19 '16 at 19:14
  • What about top, ps -A or ps -A | less? All valid... true that the question is a matter of opinion but perhaps you intend to ask for the cleanest, most human-readable form or maybe a way to list processes for only a particular user? – P Smith Jun 19 '16 at 19:18
  • @terdon well since it errors out the answer is a valid "no" :D – Rinzwind Jun 19 '16 at 19:21
  • Seeing as how I use this command it does not give any errors ;) – Chris Shoup Jun 19 '16 at 19:27

1 Answers1

2

That is not a valid command so: no.

ps -u $(whoami)

would be a valid method but since $USER equals to the current user

ps -u $USER 

is shorter and less consuming. You can also do

top -U $USER

for a real time method (it will refresh the processes) and ordered by %CPU.

Or

pstree $USER 

for a tree like view.

Rinzwind
  • 299,756