You are on page 1of 1

COMMAND HISTORY

Command History:
Command History keeps a log of all commands that you run at the command prompt.
This feature is enabled by default. Bash shell stores command history in a file located in user's home directory.

Following command can tell you where the command history file is located:

#- echo $HISTFILE
/root/.bash_history

- Let's look at the history command examples:


#- history | more
- To re-execute a command:
#- !60
- To re-run the last executed command:
#- !!

- Using the up-arrow key:


Also shows you previously typed in commands.

You might also like