It can also be useful to show only running crons, or other processes that you might be interested in. Your list of processes will then be filtered directly on display:
For example, I want to display on my web server only running Apache processes. To be able to display only those that interest us, we will use the Linux “grep” command to filter the output of the ps command and display only the processes that we are looking for. We have just seen that with “ps aux”, the list of active processes displayed is long. The ideal is now to be able to apply a filter to display only the processes that interest us. You will see that you are likely to have a lot of results. The real user ID identifies the user who created the process, -u userlist Select by effective user ID (EUID) or name. It selects the processes whose real user name or ID is in the userlist list. To have all the active processes, of the different users and outside the terminal, you will need to run the command: To list all the processes based on user owner we can use following syntax: ps -U USER -u USER u Here, -U userlist Select by real user ID (RUID) or name. With the default option, you won’t get much. You can check the man page for the different options. To list active processes on Linux, you have a system command for it, it’s ‘ps’.
Each process in the system has a unique PID. Through a 5 digit ID number Unix/Linux keeps an account of the processes, this number is call process ID or PID. For example, pwd when issued which is used to list the current directory location the user is in, a process starts. Want to view running processes on Linux? Do you want to filter the list of processes that are displayed to list only those that interest you? Good news it’s quite simple. pgrep looks through the currently running processes and lists the process IDs which match the selection criteria to stdout. Whenever a command is issued in Unix/Linux, it creates/starts a new process.