linux how to list all history code example
Example 1: ubuntu command history
cat ~/.bash_history
less ~/.bash_history
# Or use builtin history
history
Example 2: history command linux
Highly recommended command to use in terminal for reviewing commands and reuse
some of them. Just execute in terminal:
history
Also recommended to use together with grep for filtering a specific used command
history | grep "foo*"