> For the complete documentation index, see [llms.txt](https://eric-lo.gitbook.io/lab4-process/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eric-lo.gitbook.io/lab4-process/chapter1/checking-system-process.md).

# Checking System Process

To view a list of process in the system, we can use a handy command `top` or `ps`

For Details, please refer to Lab 2.

## top

In the terminal, type

```bash
$ top
```

The`top` program will show the current processes live, just like the Windows task manager :0).

![](https://848802932-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lp-5TQgFcJFf9qOBUEC%2F-Lp-5ZB50WXwtZaIRVKh%2F-Lp-64VYen6ZY1daPa29%2Ftop.png?generation=1568738683333548\&alt=media)

Consult man page for more options.

## ps

Another handy tool for checking the processes. In the terminal, we use

```
$ ps
```

![](https://848802932-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lp-5TQgFcJFf9qOBUEC%2F-Lp-5ZB50WXwtZaIRVKh%2F-Lp-64V_bpTbR0wy2W-d%2Fps.png?generation=1568738683235829\&alt=media)

This will show the current processes created by the user in this terminal. Of course, this is not quite useful. We can view all the processes in the system by:

```bash
$ ps aux
```

![](https://848802932-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lp-5TQgFcJFf9qOBUEC%2F-Lp-5ZB50WXwtZaIRVKh%2F-Lp-64Vb_5_dqHC6c1FC%2Fpsaux.png?generation=1568738683245812\&alt=media)

The command is followed by an argument, `aux`

| Argument | Description                                      |
| -------- | ------------------------------------------------ |
| a        | Shows processes from all users                   |
| u        | Displays the owner of the process                |
| x        | Also shows the processes other than the terminal |

For more information, you are welcome to look at the `man` page.
