Linux - History Command Tutorial - How to Run Previous Commands and Clear History
The history command is very useful for people who use the command line. If you haven't used it before, now is a great time to make it a habit, as it can save you time.
The history command by itself will provide a numbered list of previously executed commands:
To execute one of the previously ran commands, use the exclamation mark followed by the number of the command (no spaces):
To clear the history, run the following command:
To simply run the last ran command again, run the following command:
Hope this helps some of you become more proficient in the command line!