history
Show previously run commands
history lists all commands from current and past sessions (stored in ~/.bash_history). history | grep docker finds recent docker commands. !456 re-runs command 456.
Example
$ history | tail -3
1236 tail -f /var/log/app.log
1237 grep ERROR /var/log/app.log | wc -l
1238 history
Tip: Type it yourself in the terminal below - reading is not the same as doing.