skip to content
Alvin Lucillo

Navigating history

/ 1 min read

💻 Tech

In bash, you can navigate through history in different ways like:

  • history — lists all previous commands with order/line number
  • !60 — executes that 60th command from the list
  • !-2 — executes the command executed prior to the last one
  • !-1 — executes the last command
  • !! — same with !-1
  • !60:p — prints the 60th command to the terminal