Hello, everyone, and welcome to this video.
So we have already seen how can we kill a process using the command kill and the process ID, which
has been attached to that process.
Now, let's take an example.
If you want to kill a lot of processes that are being started by the same program, for instance, you
have opened up multiple instance of nano, which means you are editing multiple files and immediately
you want to kill all the processes that has been opened.
You can also do that.
So we are going to see how can we do that?
So let's quickly start a process first.
So let's type nano, x, y, z.
And you can see we have opened up the file which is X, Y, Z.
Let's open up one more instance of Nano using nano file two.
And you can see we have opened to instance.
Perfect.
Let me open up a new terminal and let me zoom this a little bit.
Now, as you can see, we have opened two instance of Nano.
So it has opened new two processes.
So let's quickly grab the process ID and here you can see this is the first process ID and this is the
second one.
Now if you want to kill both the nano processes, which is Nano X, Y, Z and nano file to the command
that we are going to use is kill all and the process name.
So the process name is nano, so kill all nano.
And let's quickly verify if a process has been successfully killed and you can see both the process
have been successfully killed.
Now this method is helpful in case you want to kill processes which are been running in a very, very
big count.
So let's say if there are 30 or 40 instance of a specific process that has been running and you want
to kill that you can also verify using the same command soc's grep the process name and you can see
there is no process that is running into the background.
Hence we can confirm that all the instance of Nano has been successfully closed or killed.
I hope you guys understood this.
Thank you.