How Do I View History in Ubuntu?
Contents

You can type history on a terminal to view all the previous executed commands. You can recall a command by typing ! followed by the entry number.

Where is history file in Ubuntu?

The history is stored in the ~/. bash_history file by default. You could also run ‘cat ~/. bash_history’ which is similar but does not include the line numbers or formatting.

How can I see all history in Linux?

In Linux, there is a very useful command to show you all of the last commands that have been recently used. The command is simply called history, but can also be accessed by looking at your . bash_history in your home folder. By default, the history command will show you the last five hundred commands you have entered.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest