Hello everyone.
In this demo, I'm going to show you how to use history command.
Clear Command and exit command to show the history in the terminal session.
We type the command history.
So as we can see here, the history command keeps a list of all the commands that have been used from
the terminal session.
And also it allows us to replay or to reuse these commands.
Instance of retyping them.
If I would like to tell the shell to return.
The command on the line of the history.
For example, this line I'm going to type exclamation mark.
Then the number of this line 87.
Then I hit enter.
So you can see here this is the output of the line 87.
Now, if if I would like to delete a particular command, I'm going to type history.
Then dash D, then I'm going to pick a number here.
For example, I'm going to pick 96.
Let's clear the screen.
I'm going to type history right now.
As we can see here, we don't have that command anymore.
Now if I would like to delete the entire.
Occur the entire contents of the history file.
So I'm going to type history then.
Dash C.
Clear, then I'm going to type history again.
So I just have the last two types.
I just type them at the end.
Now, if I would like to clear the screen.
Or the chairman session.
I'm going to try.
Clear.
If I would like to exit the terminal, for example, I'm going to log in as a root user.
Now I will just look in as a root user.
Now, if I would like to exit, I'm going to type exit.
As you can see here, if you would like to get more information about the history command, we can go
to the man page man history.
The same thing.
If you would like to get more information about the clear, go to the man page.
Clear the terminal screen.
Now, if I would like to get also more information about the exit, we can go to the main page of the
exit command.
Also, there is another thing if I would like to exit.
The terminal.
So now I'm a root user.
So I hit or I type exit.
Then I hit enter.
As we can see here, we close the terminal.
That's it for this session.
Thank you and see you in the next lesson.