1 00:00:00,300 --> 00:00:01,320 Hello everyone. 2 00:00:01,320 --> 00:00:05,490 In this demo, I'm going to show you how to use history command. 3 00:00:05,520 --> 00:00:10,890 Clear Command and exit command to show the history in the terminal session. 4 00:00:10,890 --> 00:00:12,630 We type the command history. 5 00:00:13,080 --> 00:00:20,610 So as we can see here, the history command keeps a list of all the commands that have been used from 6 00:00:20,610 --> 00:00:21,900 the terminal session. 7 00:00:22,760 --> 00:00:27,560 And also it allows us to replay or to reuse these commands. 8 00:00:27,860 --> 00:00:29,990 Instance of retyping them. 9 00:00:30,170 --> 00:00:33,290 If I would like to tell the shell to return. 10 00:00:33,320 --> 00:00:37,070 The command on the line of the history. 11 00:00:37,070 --> 00:00:41,570 For example, this line I'm going to type exclamation mark. 12 00:00:41,570 --> 00:00:45,020 Then the number of this line 87. 13 00:00:45,030 --> 00:00:45,920 Then I hit enter. 14 00:00:46,370 --> 00:00:52,070 So you can see here this is the output of the line 87. 15 00:00:52,670 --> 00:00:59,690 Now, if if I would like to delete a particular command, I'm going to type history. 16 00:00:59,690 --> 00:01:04,370 Then dash D, then I'm going to pick a number here. 17 00:01:04,370 --> 00:01:08,330 For example, I'm going to pick 96. 18 00:01:09,860 --> 00:01:11,630 Let's clear the screen. 19 00:01:11,990 --> 00:01:14,120 I'm going to type history right now. 20 00:01:14,510 --> 00:01:17,450 As we can see here, we don't have that command anymore. 21 00:01:18,730 --> 00:01:21,520 Now if I would like to delete the entire. 22 00:01:22,690 --> 00:01:25,990 Occur the entire contents of the history file. 23 00:01:26,020 --> 00:01:27,790 So I'm going to type history then. 24 00:01:27,790 --> 00:01:28,660 Dash C. 25 00:01:30,480 --> 00:01:33,240 Clear, then I'm going to type history again. 26 00:01:33,240 --> 00:01:35,970 So I just have the last two types. 27 00:01:35,970 --> 00:01:38,280 I just type them at the end. 28 00:01:38,790 --> 00:01:41,340 Now, if I would like to clear the screen. 29 00:01:42,370 --> 00:01:43,560 Or the chairman session. 30 00:01:43,560 --> 00:01:46,160 I'm going to try. 31 00:01:46,230 --> 00:01:46,680 Clear. 32 00:01:49,200 --> 00:01:54,150 If I would like to exit the terminal, for example, I'm going to log in as a root user. 33 00:01:57,190 --> 00:02:00,220 Now I will just look in as a root user. 34 00:02:00,250 --> 00:02:03,490 Now, if I would like to exit, I'm going to type exit. 35 00:02:04,870 --> 00:02:09,310 As you can see here, if you would like to get more information about the history command, we can go 36 00:02:09,310 --> 00:02:11,290 to the man page man history. 37 00:02:11,680 --> 00:02:12,190 The same thing. 38 00:02:12,190 --> 00:02:16,690 If you would like to get more information about the clear, go to the man page. 39 00:02:16,720 --> 00:02:18,550 Clear the terminal screen. 40 00:02:19,210 --> 00:02:25,000 Now, if I would like to get also more information about the exit, we can go to the main page of the 41 00:02:25,000 --> 00:02:26,350 exit command. 42 00:02:26,380 --> 00:02:29,500 Also, there is another thing if I would like to exit. 43 00:02:30,620 --> 00:02:31,290 The terminal. 44 00:02:32,120 --> 00:02:34,340 So now I'm a root user. 45 00:02:34,340 --> 00:02:36,700 So I hit or I type exit. 46 00:02:36,710 --> 00:02:37,730 Then I hit enter. 47 00:02:38,180 --> 00:02:41,030 As we can see here, we close the terminal. 48 00:02:41,480 --> 00:02:43,130 That's it for this session. 49 00:02:43,520 --> 00:02:45,890 Thank you and see you in the next lesson.