Question:top:how to use top unix command on command line?


Think of top like ‘Task Manager’ in Windows or ‘Activity Monitor’ in Mac OS X. Simply run:


And you are shown your running processes. It is a realtime view unlike ‘ps’ which also shows your running processes. To quit top hit the ‘q’ key. The first column displayed in top is the PID. Every process has a unique ID and you use this ID if you need to kill a process. Do not just kill processes for fun you should only do this if you know for sure there won’t be any adverse effects:

kill -9 1234

Where the -9 flag is the SIGKILL signal that no process can ignore. It will force quit the process with PID ’1234′. There are many other signals you can use on a process that you can see here.

asked Sep 13, 2013 in Java Interview Questions by anonymous
edited Sep 12, 2013
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.