QueHow

A How-To and wiki Blog

  • Operating System
    • Windows
      • Windows 10
      • Windows 7
    • Linux
  • Software
    • Application Software
    • Microsoft Office
      • Outlook
      • Word
      • PowerPoint
  • Internet
    • Browsers
      • Mozilla Firefox
      • Google Chrome
    • CMS
    • Tips & Tricks
  • Website
    • ecommerce
    • Google
    • Social Networking
    • General Websites
  • Mobile
  • Email
    • Gmail
  • Wiki

How to Show Running Processes in Ubuntu

By Neha T Leave a Comment

How often you check for the running processes on your Ubuntu system? The basic need to do is to know about the process ID (PID), memory utilization, etc. With the help of PID you can easily kill a process whichever is no longer needed or stopped unexpectedly.

Various commands are available to look at the running processes, but its usage may vary according to the requirement, they are as follows:

  1. ps: The ps command is used to show status of the processes in a single snapshot. It gives an overall CPU utilization within the lifetime of a process.
    Syntax to use: “ps” or “ps [options]” 
  2. pstree: This command will give you the same result as “ps”, but it differs in the way the information is displayed. “Pstree” will list the processes in a hierarchical way and in a tree like structure. And the other difference is that, it lists the data in alphabetical order, whereas “ps” shows the processes in the order they were created.
    Syntax to use: “pstree [options] [username or pid] OR “pstree” 
  3. top: This command gives you the information of most active processes in the system. The information changes in every 5 seconds. As compared to “ps”, the top command will display only the current CPU utilization.
    Syntax to use it: “top” 
  4. htop: It is the modified form of “top”. To use this command you have to install it firstly. It provides convenient result about resource utilization in addition to “top” command.

Our task to see, which processes are running will get accomplished using the first two commands only, so there is no need to install the fourth one.

In this article, we”ll discuss about how to show running processes in Ubuntu, and for that you need to be patient, while looking at the output of each command as shown below.

Steps to Show Running Processes in Ubuntu

Step 1: Let’s start with “ps [options]” command. Firstly, I will use “ps ux” where “ux” is one of the defined option. Here, “u” is used to display the user processes which means only the current user and “x” is for the processes having no controlling terminal, which starts during the system booting.

How-to-show-running-processes-in-Ubuntu-step-1

Step 2: Output of the above command is shown in the figure below. You may notice here, only the processes of user named “ubuntu14” is displayed. There are various parameters stated such as user, pid, %cpu, etc.

How-to-show-running-processes-in-Ubuntu-step2

USER: It means the name of the user corresponding to the process
PID: It is an abbreviation for “process identification number”. Every process has its unique process ID.
%CPU: It will display the CPU time divided by the time of the process since it is running.
%MEM: It describes the ratio of real memory size occupied by a process to the physical memory on the machine.
VSZ: It shows the virtual memory usage by the process.
RSS: It stands for Resident Set Size that means, the memory allocated to the process including the stack and the heap memory.
TTY: Previously known as “teletype” but now called as the Terminal Type in which the user has logged on.
STAT: It states the file attributes of an index node.
START: Shows the starting time of the process.
TIME: Shows the CPU time measured in minutes & seconds.
COMMAND: States command along with arguments.

Step 3: If you want to display the process of all the users, then use “ps aux” command, where ‘a’ is used to look at processes of all users and the rest is same as discussed above.

How-to-show-running-processes-in-Ubuntu-step3

Step 4: The attributes of the “ps aux” will be same as in the “ps ux” command. However, it will display the processes of all the users including the root user also.

How-to-show-running-processes-in-Ubuntu-step4

Step 5: In addition to a root, the user “ubuntu14” processes are also listed as you can see in the figure below.

How-to-show-running-processes-in-Ubuntu-step5

Step 6: If you are interested in knowing only about the process without a username, CPU and memory utilization then type “ps -e” command, so as to have a short information about the processes.

How-to-show-running-processes-in-Ubuntu-step6

Step 7: The above command will result in “PID, TTY, TIME & CMD” only. CMD describes the name of the command, that initiated that process as shown below.

How-to-show-running-processes-in-Ubuntu-step7

Step 8: Command, which you have used earlier has resulted in a fewer attributes associated with the PID. If looking for a full list with Parent PID, then use the “ps -ef” command.

How-to-show-running-processes-in-Ubuntu-step8

Step 9: “ps -ef” shows other attributes in addition to “ps -e”, such as PPID, it is Parent Process ID.

From this output, you may have understood, why the list of processes is so long. As a single parent process has a large number of child processes, as illustrated in the figure below.

How-to-show-running-processes-in-Ubuntu-step9

Step 10: Now, move on to the “pstree” command that is used to clearly understand the relation between the processes.

Just type “pstree” command or use it with any of the [options]. I have used only “pstree” to list all the processes.

How-to-show-running-processes-in-Ubuntu-step10

Step 11: Here, you will come across the actual relation between the parent and child process. In all the previous commands, you may figure out “init” listed on the top. If not, then scroll to the top.

In this figure also, “init” is clearly mentioned. “Init” is the ancestor of all the processes in the Linux system in general, that’s why it always appears at the top.

How-to-show-running-processes-in-Ubuntu-step11

NOTE: To have a compact view of all the running processes, so that it may be captured on a single screen, use “less” with the commands elucidated above.

For an example: “pstree | less”

You Might Also Like:

how-to-kill-process-in-ubuntuHow to Kill a Process in Ubuntu How to use Auto Save Session for running applications in Ubuntu 14.04 How to Kill a process in Windows 10? How to forcefully close a program in Ubuntu 14.04 (2 Methods) How to Kill a Process in Windows 7 how-to-hide-and-show-files-and-folders-in-ubuntuHow to Hide & Show Files and Folders in Ubuntu How to Check Ubuntu Kernel Version How to Start Ubuntu in Safe Mode Installed on VMware Workstation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Viewed

  • How to Install and Use TELNET in Ubuntu
  • How to install Hindi fonts in MS Word
  • How to Change a File Extension in Windows 10?
  • How to create a flipkart account in 3 simple steps
  • How to Change Monitor Refresh Rate in Windows 10?
  • How to install IIS on Windows 10
  • How to Insert Clickable Checkbox in MS Word 2016?
  • How to Set Auto Reply in Outlook 2016?
  • How to Login as Administrator in Windows 10?
  • How to Check RAM Size and System Type in Windows 10?

Recent Additions

  • How to Add Hyperlink to Another Sheet in Excel?
  • How to Add and Remove Watermark in Excel
  • How to use Relative and Absolute Cell Reference in Excel?
  • How to Enable and Disable Scroll Lock in Excel?
  • How to Use INDEX and MATCH Functions in Excel?
  • How to Make Bar Graph in Excel?
  • How to Count Duplicate Values in Excel?
  • How to Wrap Text in Excel?
  • How to Round off Numbers in Excel?
  • How to Create a Bell Curve in Excel?

Related Searches

  • How to Rotate Screen in Windows 7?
  • How to Reduce Boot Time of Windows 7
  • How to Mute Someone’s WhatsApp Status?
  • How to Send Photo on WhatsApp?
  • How to Remember Password in Firefox?

Copyright © 2023 · QueHow · Contact Us