WEBVTT - This file was automatically generated by VIMEO

0
00:00:04.400 --> 00:00:07.300
Hello everyone and welcome to this

1
00:00:07.300 --> 00:00:10.500
 video. So we have already seen how

2
00:00:10.500 --> 00:00:13.200
 can we kill a process using the

3
00:00:13.200 --> 00:00:16.200
 command kill and the process ID which has

4
00:00:16.200 --> 00:00:18.400
 been attached to that process?

5
00:00:19.200 --> 00:00:22.300
Now, let's take an example. If you

6
00:00:22.300 --> 00:00:25.400
 want to kill a lot of processes that are

7
00:00:25.400 --> 00:00:28.500
 being started by the same program. For instance.

8
00:00:28.500 --> 00:00:32.200
 You have opened up multiple instance

9
00:00:31.200 --> 00:00:34.500
 of Nano, which means you are editing

10
00:00:34.500 --> 00:00:36.100
 multiple files and

11
00:00:37.700 --> 00:00:40.800
Immediately you want to kill all the processes that has been opened.

12
00:00:40.800 --> 00:00:42.100
 You can also do that.

13
00:00:43.200 --> 00:00:46.500
So we are going to see how can we do that? So let's quickly

14
00:00:46.500 --> 00:00:49.600
 start a process first. So let's type

15
00:00:49.600 --> 00:00:52.600
 Nano XYZ and you can see we have

16
00:00:52.600 --> 00:00:55.600
 opened up the file, which is x y

17
00:00:55.600 --> 00:00:58.600
 z. Let's open up one more instance of Nano

18
00:00:58.600 --> 00:01:01.100
 using Nano file to and you

19
00:01:01.100 --> 00:01:03.300
 can see we have opened to instance.

20
00:01:04.100 --> 00:01:07.400
Perfect. Let me open up a new terminal and let me

21
00:01:07.400 --> 00:01:08.600
 Zoom this a little bit.

22
00:01:09.500 --> 00:01:12.500
Now as you can see, we have opened two

23
00:01:12.500 --> 00:01:15.700
 instance of Nano. So it has opened new

24
00:01:15.700 --> 00:01:18.500
 two processes. So let's quickly grab

25
00:01:18.500 --> 00:01:21.300
 the process ID and here you can see this is

26
00:01:21.300 --> 00:01:23.900
 the first process ID and this is the second one.

27
00:01:24.600 --> 00:01:27.500
now if you want to kill both the

28
00:01:27.500 --> 00:01:30.700
 nanoprocesses, which is nano XYZ and

29
00:01:30.700 --> 00:01:32.300
 Nano file to

30
00:01:33.100 --> 00:01:36.900
the command that we are going to use is kill all and

31
00:01:36.900 --> 00:01:39.400
 the process name. So the process

32
00:01:39.400 --> 00:01:42.400
 name is nano. So kill all Nano and let's

33
00:01:42.400 --> 00:01:45.700
 quickly verify if our processes has been successfully

34
00:01:45.700 --> 00:01:48.400
 killed and you can see both the process have

35
00:01:48.400 --> 00:01:51.900
 been successfully killed. Now. This method is

36
00:01:51.900 --> 00:01:55.200
 helpful in case you want to kill processes

37
00:01:54.200 --> 00:01:57.600
 which are being running in a

38
00:01:57.600 --> 00:02:00.300
 very very big town. So let's say there are 30 or

39
00:02:00.300 --> 00:02:03.300
 40 instance of a specific process that

40
00:02:03.300 --> 00:02:04.900
 has been running anyone to kill that.

41
00:02:06.200 --> 00:02:09.800
You can also verify using the same command PS aux

42
00:02:09.800 --> 00:02:12.200
 grip the process name and you

43
00:02:12.200 --> 00:02:15.500
 can see there is no process that is running into the background,

44
00:02:15.500 --> 00:02:18.300
 hence. We can confirm that all the

45
00:02:18.300 --> 00:02:22.200
 instance of Nano has been successfully closed

46
00:02:21.200 --> 00:02:24.100
 or killed. I hope you

47
00:02:24.100 --> 00:02:25.700
 guys understood this. Thank you.
