This article was updated and rechecked on 30th of July 2022

Category: Linux Terminal

Added: 23rd of December 2015

Updated On: 30th of July 2022

Viewed: 2,482 times

How can I view all of the bash history in Linux using the terminal

Every time you enter a command in the terminal, it is written to the .bash_history file.

The .bash_history log file is located under your home directory. This is a hidden file named so to view it you will need to show hidden files in your file file manager, or press click CTRL+H

.bash_history file, located under your home directory

To view all the commands you entered in the terminal, enter the following command

cat .bash_history

If you want a hard copy, you can also output this to a .txt file by enter the following command in the terminal
cat .bash_history > bash_history.txt