TaskList in Linux

How to display a task list in Linux

Use the following command to display the task list.

  1. The “top” command: displays the running process in real time. Displays CPU, memory usage, process status, and so on. You can quit by pressing Ctrl + C.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    top - 20:07:45 up 22:48,  1 user,  load average: 0.39, 0.24, 0.19
    Tasks: 198 total, 1 running, 197 sleeping, 0 stopped, 0 zombie
    %Cpu(s): 4.8 us, 3.0 sy, 0.0 ni, 92.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
    KiB Mem : 8038780 total, 1191088 free, 4469544 used, 2375148 buff/cache
    KiB Swap: 8265724 total, 7867900 free, 397824 used. 2816892 avail Mem

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    2077 root 20 0 21820 3376 2892 S 3.5 0.0 2:20.91 systemd-jou+
    2364 root 20 0 1284476 137332 23416 S 2.5 1.7 23:22.43 VirtualBox
    3529 john 20 0 728836 27360 12672 S 2.5 0.3 0:18.11 xfce4-term+
    693 root 20 0 72200 2984 2396 S 1.5 0.0 0:00.37 irqbalance
    892 root 20 0 154664 6788 4076 S 0.7 0.1 0:53.64 upowerd



  2. The “PS” command: list the currently running processes. You can use some options to focus on specific information or filter the state of the process.

“PS aux” displays all the currently running processes. “PS aux grep < process name >” searches for a process that matches the specified process name.

  1. “Htop” command: a task management tool, such as top command, can display a list of processes and end the process.
    You can use these commands to display the task list.