DEV Community

Cover image for How to see all the commands executed so far or the history of commands executed in the Linux terminal?
MELVIN GEORGE
MELVIN GEORGE

Posted on • Originally published at melvingeorge.me

How to see all the commands executed so far or the history of commands executed in the Linux terminal?

Originally posted here!

To see all the commands you have executed so far in the terminal as a list, you can use the history command in the Linux terminal.

# See all the commands executed
# so far in the Linux terminal
history
Enter fullscreen mode Exit fullscreen mode
  • Running the above command will show the list of commands the user has executed till that point in time.

For example, the output of executing the above history command may look like this,

# OUTPUT

 9276  ls
 9277  mkdir hello-world
 9278  cd hello-world
 9279  ls -a
 9280  touch myfile.txt
 ..
 ..
 ..
Enter fullscreen mode Exit fullscreen mode

See the execution of the above command live in repl.it.

That's all 😃!

Feel free to share if you found this useful 😃.


Discussion (0)