List and run last used commands in Linux

To list through most recently used commands one by one use Arrow-Up key

To display all used commands:

To run a command from the history list:
where 391 command number

To find a particular command in your history:
history | grep command
where command part of the command you are after

Your history is saved in a file:
where root your user name


Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait