Linux – Task Manager and Kill Processes (top)

Top is the built in Task Manager for the Linux CLI. It can be a powerful and complex tool, but most people only need it for simple tasks.

  • top – starts top
  • sudo top – allows you to kill processes
  • For Help type h
  • To Quit type q
  • To search for a process type o then COMMAND= and the name of the process
  • To search based on user of process type u and then username
  • To see a parent/child tree of services type V
  • To kill a process type k and then PID (Process ID)

1 Comment

  1. I wanted to share my top N key shortcuts I’m using in top:
    – M: sort by memory usage (usually to find processing eating memory)
    – s ‘delay’: change the default delay to ‘delay’ seconds
    – 1: to switch between a global CPU core view and an individual core
    view

    The VIRT (virtual memory) can be confusing nowadays: it shows
    the virtual memory used by all threads of the process, so usually
    not that interesting. RES (residental) is more to be taken serious.

    On the confusing nature of the Linux load calculation I found
    a nice blog lately:

    http://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html

    Caveat: dragons ahead 🙂

Leave a Reply