You’ll need to know how to list running processes and manage them if you’re a Linux administrator. In this tutorial, we’ll go over ps, a useful Linux command for listing processes in the Ubuntu Server/Desktop operating system.
The ps command, when run without any parameters, displays a list of processes that have been started from our current Bash shell terminal (TTY).
We can change the way the ps command displays running processes in Ubuntu Server by using a variety of useful options. The aux option is the most common option used by administrators.
The ps aux command displays all currently running processes, including the user (process owner), CPU utilization, Memory utilization, TTY, Start time, and, most importantly, the Process ID (PID).
When it comes to managing processes on your Ubuntu server, each process has its own PID. To kill a process, for example, you’ll need to know its PID.
In practice, the ps aux command is usually used in conjunction with the grep command to filter output. Let’s say you’re looking for the MySQL process’s PID.
To do so, run the following command with the ps command:
ps aux | grep -i mysql
If you look at the main page of ps, you’ll notice that it has a lot of options, but in the real world, Linux administrators use ps aux all the time.