Skills › 💻 Terminal & git

Search your shell history with Ctrl+R

Stop pressing the up arrow 40 times. Type any part of an old command and it appears.

⏱ 30s

  1. Press Ctrl+R.
  2. Type any part of the command you're looking for.
  3. Press Ctrl+R again to step back to older matches.
  4. Press Enter to run it, or an arrow key to edit it first. Ctrl+G cancels.

Tip: Works in bash and zsh by default.

Try it now: Open a terminal, press Ctrl+R and type "git" to find your last git command.

Practice in the feed →

Next crumbs

Sources