How to List Running Processes in Ubuntu Server with ps aux
As a Linux administrator, you will need to know how to list running processes and how to manage these processes. In this tutorial, we will look at ps
, a very important Linux command that we can use to list processes in Ubuntu Server/Desktop operating system.
The ps
command with no options shows a list of processes initiated from our current Bash shell Terminal (TTY).
There are lots of useful options we can use with the ps command to change the way in which it shows running processes in Ubuntu Server. The most common option any administrator likely to use is the aux
option.
ps aux
The ps aux
command shows all running processes with lots of useful information such as the user (owner of the process), CPU utilization, Memory utilization, TTY, Start time, and most importantly the Process ID (PID).
Each process running on your Ubuntu server has a unique PID, when it comes to managing processes, you'll find that the PID is very useful. For example, to kill a process you need to know the PID of that program.
In practice, the ps aux
command is most commonly used with the grep
command to filter the output. For example, let's say you want to find the PID of the MySQL process.
To do that, you will execute the ps command as follows:
ps aux | grep -i mysql
If you look at the man page, you will see there are plenty of options available with ps, but in the real world, ps aux
is the one that Linux administrators use all the time.