history command is used to view the previously executed command. This feature was not available in the Bourne shell. Bash and Korn support this feature in which every command executed is treated as the event and is associated with an event number using which they can be recalled and changed if required. These commands are saved in a history file. In Bash shell history command shows the whole list of the command.
Syntax:
$ history

Here, the number(termed as event number) preceded before each command depends on the system. You may get different numbers while executing on your own system.
Important Points
history | tail
It is used to view the last 10 commands