DEV Community

Cover image for Get history of past command you typed ⌨️ on terminal🐧.
Abhay Prajapati
Abhay Prajapati

Posted on

Get history of past command you typed ⌨️ on terminal🐧.

Terminal commands are so useful,

but what we can use out past command again and again.

Let's find out how can we go that.

  1. Arrow keys

LikeClickArrowGIF.gif

⬆️ -⬇️ keys 
Enter fullscreen mode Exit fullscreen mode

to navigation in most recent commands

2 . Search in your terminal with ctrl/cmd+R

TelescopeSpyOnGIF.gif

`ctrl`/`cmd` + R
Enter fullscreen mode Exit fullscreen mode

when you press ctrl/cmd + R, you will see something like this.

(reverse-i-search)`': 'then type here'
Enter fullscreen mode Exit fullscreen mode
  1. See All History

ItsHistoryYoGIF.gif

to get a history of all commands

 history
Enter fullscreen mode Exit fullscreen mode
  1. History with count

CountingGIF.gif

history 10
Enter fullscreen mode Exit fullscreen mode

you will get the last 10 commands of your terminal

Thanks for your like👍🏾.

connect with me:
Twitter : @AbhayPrajapati_
Github: @theabhayprajapati

Top comments (0)