Category: Linux Terminal

Added: 23rd of December 2015

Updated On: 18th of April 2024

Viewed: 2,808 times


This article was updated and rechecked on 18th of April 2024

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 > /home/$USER/Desktop/bash_history.txt