Hello, everyone, and welcome to this video.
In this video, we are going to see the process management in Linux.
So in case you want to see any processes that is been running into your Linux operating system, then
you can simply use the command, which is PS B stands for process.
As you can see, this is the output which gives you the P ID, which is the process ID attached to that
particular process, which is a number.
You can also see the TX Y time and the CMD.
All right.
So this is the output of the command.
Now, in case you want to see all the processes that are been running in the background, you can simply
type PS, space hyphen e, f and it is going to give you the list of all the processes.
Similarly, you can use the command, which is PS OCS, and it will give you the similar output.
Now remember when you type the command PS ox here is transferred to show all the processes for all users.
Use stands for display the processes, users or owner and X stands for to show the processes which are
not being attached to the terminal, which basically means you are able to see all the processes that
are been running into the background as well.
Also to note B's space hyphen F and B's OCS both exactly gives the same output.
That's why I have shown both the commands over here.
All right, so let's quickly run Nano, X, Y, Z and quickly start a new process.
So you can see I have opened up the nano terminal and obviously if we start an E command, it is going
to run a process and a new process ID is going to get assigned to that process.
Let's quickly verify that.
Let's go into a new terminal and type the command p is OCS.
And here we are going to grep which is basically filter the process name which is nano and hit enter.
And you can see over here, here is the process which is been running.
So the command that we executed was Nano, X, Y, Z, and the process ID that has been assigned to
this process is 901038.
Perfect till here.
Now let's see a new command which is kill.
Using this command, we can kill any process that has been running.
So let's quickly kill the process that is Nano, Z, Z, which is open over here.
So we have copied the process ID and hit enter and this should kill the process.
And you can see we got an error which says received signal hub or signal dome.
This basically means the process has been terminated.
I hope you guys understood how you can see the processes which are been running using the OCS command
and how you can kill processes.
Thank you.