history ( Linux command tutorials )

 

  • This command gives you a list of all the commands you have used in the terminal.

  • One advantage of this command is you can use the same command multiple times.

  • You can use Up Arrow or Down Arrow to use previously used commands in the current session.

  • While history command will store all commands used from beginning.

 

Note:

  • If you want to execute any command from earlier command list, you can execute a previous command by using ! followed by command number.

  • For example: ! 27 will execute 'ls' list directory 27th number command.


 

border