1 00:00:01,620 --> 00:00:04,860 Hello, everyone, and welcome to this video. 2 00:00:05,340 --> 00:00:10,250 In this video, we are going to see the process management in Linux. 3 00:00:10,260 --> 00:00:18,270 So in case you want to see any processes that is been running into your Linux operating system, then 4 00:00:18,270 --> 00:00:23,340 you can simply use the command, which is PS B stands for process. 5 00:00:23,790 --> 00:00:31,470 As you can see, this is the output which gives you the P ID, which is the process ID attached to that 6 00:00:31,470 --> 00:00:34,020 particular process, which is a number. 7 00:00:34,230 --> 00:00:38,730 You can also see the TX Y time and the CMD. 8 00:00:39,480 --> 00:00:40,080 All right. 9 00:00:40,080 --> 00:00:43,860 So this is the output of the command. 10 00:00:44,010 --> 00:00:50,640 Now, in case you want to see all the processes that are been running in the background, you can simply 11 00:00:50,640 --> 00:00:58,110 type PS, space hyphen e, f and it is going to give you the list of all the processes. 12 00:00:58,440 --> 00:01:05,490 Similarly, you can use the command, which is PS OCS, and it will give you the similar output. 13 00:01:05,520 --> 00:01:15,570 Now remember when you type the command PS ox here is transferred to show all the processes for all users. 14 00:01:15,780 --> 00:01:24,900 Use stands for display the processes, users or owner and X stands for to show the processes which are 15 00:01:24,900 --> 00:01:31,050 not being attached to the terminal, which basically means you are able to see all the processes that 16 00:01:31,050 --> 00:01:33,090 are been running into the background as well. 17 00:01:33,390 --> 00:01:41,970 Also to note B's space hyphen F and B's OCS both exactly gives the same output. 18 00:01:42,720 --> 00:01:46,110 That's why I have shown both the commands over here. 19 00:01:46,290 --> 00:01:52,770 All right, so let's quickly run Nano, X, Y, Z and quickly start a new process. 20 00:01:52,770 --> 00:02:01,110 So you can see I have opened up the nano terminal and obviously if we start an E command, it is going 21 00:02:01,110 --> 00:02:07,650 to run a process and a new process ID is going to get assigned to that process. 22 00:02:07,650 --> 00:02:09,210 Let's quickly verify that. 23 00:02:09,450 --> 00:02:14,040 Let's go into a new terminal and type the command p is OCS. 24 00:02:14,040 --> 00:02:23,160 And here we are going to grep which is basically filter the process name which is nano and hit enter. 25 00:02:24,020 --> 00:02:27,980 And you can see over here, here is the process which is been running. 26 00:02:27,980 --> 00:02:35,990 So the command that we executed was Nano, X, Y, Z, and the process ID that has been assigned to 27 00:02:35,990 --> 00:02:40,060 this process is 901038. 28 00:02:40,070 --> 00:02:41,390 Perfect till here. 29 00:02:41,570 --> 00:02:45,240 Now let's see a new command which is kill. 30 00:02:45,260 --> 00:02:50,480 Using this command, we can kill any process that has been running. 31 00:02:50,480 --> 00:02:57,140 So let's quickly kill the process that is Nano, Z, Z, which is open over here. 32 00:02:57,620 --> 00:03:03,170 So we have copied the process ID and hit enter and this should kill the process. 33 00:03:03,170 --> 00:03:08,780 And you can see we got an error which says received signal hub or signal dome. 34 00:03:09,350 --> 00:03:12,200 This basically means the process has been terminated. 35 00:03:12,290 --> 00:03:18,830 I hope you guys understood how you can see the processes which are been running using the OCS command 36 00:03:18,830 --> 00:03:20,780 and how you can kill processes. 37 00:03:20,810 --> 00:03:21,560 Thank you.