


Every other process on your system is a child of the init process. The init process is the first process started by the Linux kernel when a system boots.

Take a look at the following example and notice the different states for each process displayed in the STAT column: ps xĤ39 pts/2 R+ 0:00 ps -x Viewing the Process Hierarchy T means that the process has stopped like when you enter control-Z in the vi text editor. R means that the command is actively running.

A capital S means that the process is in an interruptible sleep state, and is waiting for some event, like user input. For example, a lowercase s indicates that the process is a session leader (i.e., the root process). This column can display a large number of possible values depending on the process it displays. The ps x command returns an additional column called sate information ( STAT). Also, notice that the command is using the BSD-style option. However, you may want to view all the processes that the current user owns, for example if you have multiple terminal sessions running for the same user. In the example, 10946 is the process PID.īy default, the ps command displays only the processes associated with your current terminal session. For example, the ps -quick-pid 10946 command uses the long option -quick-pid to display running process information by a specific PID. GNU-style options are preceded by two dashes ( -), and are reserved for long options. For example, notice the ps aux command’s options aux is formatted in the BSD style. When using BSD-style options with the ps command, you must exclude the dash ( -), however, you can group your options. For example, the -aux options in the ps -aux command is preceded by a dash when using the UNIX style. When using UNIX-style options, your option(s) must be preceded by a dash ( -) and can be grouped together. You can use a mix of each style, however, you may notice inconsistent behavior across Linux distributions. The ps command accepts three different styles of options UNIX, BSD, and GNU. The output only includes the name of the command or executable and does not display any options that were passed in. This value is not the run time of the process.ĬMD: The name of the command or executable that is running. Displays the amount of CPU time used by the process. Processes that do not originate from a controlling terminal and were initiated by the system at boot are displayed with a question mark. TTY: The controlling terminal associated with the process. The PID is useful when you need to use a command like kill or nice, which take a PID as their input. PID: The process ID is your system’s tracking number for the process. The default output of the ps command contains four columns that provide the following information: The command returns a similar output: PID TTY TIME CMD The ps command without any options displays information about processes that are bound by the controlling terminal. This guide provides an introduction to the ps aux command with brief examples to help you interpret its output. Since the ps aux command displays an overview of all the processes that are running, it is a great tool to understand and troubleshoot the health and state of your Linux system. A process is associated with any program running on your system, and is used to manage and monitor a program’s memory usage, processor time, and I/O resources. The ps aux command is a tool to monitor processes running on your Linux system.
