We need to type various commands in the shell for various purposes. Sometimes we need to execute same commands multiple times. It is very time consuming or boring task to type same commands multiple times. Fortunately, bash has a good solution to this problem. By using the bash history mechanism, the previously executed commands can retrieve and execute easily without typing the command again.