Now that we understand what processes are, let's take a look at listing processes. When it comes to inspecting the running processes on our system a main command that we'll go to oftentimes, is the PS command. This provides us detailed information about processes executing within our system. When looking at the output of the PS command, you'll need to learn a few specific bits of information that is applying to you about the processes. First, we'll learn the user identification information about the running process. This is the user that the process is running as, and will determine things like privileges in security implications throughout the execution of the process. Next, as we discussed earlier, there's a unique process identification number for each process known as the PID or PID. If this is a child process, there will be the companion parental process identification number tract as well. The PS command will also keep us informed of running real-time of CPU usage for the process in question. Additionally, we'll learn about how much memory the process has been allocated in its various locations throughout the operating system. If this process writes out to some component or file, we'll learn the location of the process is standard output. This is also referred to as the controlling terminal. Lastly, a critical piece of information is the particular state that the process is currently in. We learn briefly about these process states and we'll look at more of this as we inspect individual processes. As we've started to grow our repertoire of commands, we've started to use command options or flags. When it comes to the PS command, we can use any of three specific formats that are available for many commands within Linux. The first command is the one that we've seen most regularly, which is known as the UNIX or POSIX options. These can be grouped together and are preceded by a single dash. We've seen this as we've used the copy command and the LS commands in previous sections and chapters, BSD options are available as well. The way to express those is that they may be grouped together, but do not require a dash. We've not yet seen a command that we've used this interpretation, but we've seen something similar. In the BSD expression, we no longer require the dash to begin our flags, for the options we wish to invoke. Lastly, well, we've discussed that there's also the GNU long options, these are preceded by two dashes and typically invoke the entire word or phrase to describe what the option does. Here you can see ps-aux, which is an expression in UNIX or POSIX terminology, is not the same as ps aux. For this command, we will have the same outcomes from these particular flags, but the expression here is one that's differing between the UNIX or POSIX nomenclature, versus the BSD style of expressing options. I just wanted to call that out simply here because PS is one command that takes all three styles of these options. I'll use these interchangeably throughout the rest of the course depending on the particular command or circumstance and I want you to feel comfortable understanding the differences between these types of expressions. When it comes to the PS command, the most common set of options administrators use is the a, u and x. This isn't short for anything like auxiliary, but this is three specific options for the PS command. Let's go ahead and jump in our terminal and take a look at what ps aux provides as far as information. From our terminal, let's go ahead and run the command ps aux. This provides us output about a number of running system processes highlighting one single line. We can see all the information provided. If I scroll up to the top of this output, I'll be able to see the column headers to describe what each of these bits of information are. Let me scroll up now to show that. Here we can see the column headers, with my font that as large as that assist us in being able to capture the output for these recordings, I have a line rap. Let me reduce that now simply, so we can see this information on a single line. We can see that it's providing information about the user, that this process is running under, the PID of the specific process, the resources that are being allocated for this process, and a number of other bits of information. The one that we discussed previously on state is shown here. Lastly, some additional information about when the process was initiated, as well as how much time it's been allocated for CPU resources are provided. The last field tells us the command itself that's being executed, and you can see an example of that, in the first entry here. The command also includes all of the various options that were running for that process. We can see as we continue to flux between the various options for the PS command, we can get different information out of the command output, and the output included here. We can see the output differences between the ps aux command, the ps lax command, and the ps ef command. Depending on your needs as you inspect processes, you can combine and use the various flags available to the PS command, to get the relevant information for your troubleshooting needs. By default, the PS command gives you all processes for the current user. This correlates to all the processes running in the given terminal the user is currently using. When we see processes in brackets, that means that these are scheduled kernel threads. When we see the dreaded zombie processes, these are typically listed as exiting and no longer actually updating that status and closing out or defunct. The process itself will try to continue to exit for only so long before declaring itself defunct. The output of a PS command will only display the values once for the current moment in time that the PS command was executed. If we wish to see a running monitor of these processes, we can utilize the top command. The top command by default will update every several seconds in order to refresh the information about the running processes. The default output is initially sorted by process ID for the PS command, while the output for top will always be sorted by the top consumers of the particular column that you're sorting the output by. This sorted output can be adjusted as you're reviewing the top output, and for PS, we can pass in additional flags or options to determine the sort order of the PS output. That concludes this section on processes. I look forward to seeing you in the next video.