Useful Bash History Short cuts

Keyboard shortcuts to manipulate bash history with.

  • Ctrl + r – search the history backwards
  • Ctrl + p – scroll backwards through the bash history
  • Ctrl + n – scroll forwards through bash history
  • !! – execute the last command
  • !stuff – execute the last command that started with stuff
  • !stuff:p - print the last command that started with stuff

Useful Korn Shell Short cuts

Keyboard short cuts to manipulate ksh history with.

  • esc + / – search the history backwards
  • esc + k – scroll backwards through the bash history
  • esc + j – scroll forwards through bash history
  • r – execute the last command
  • r stuff – execute the last command that started with stuff
  • r n - run command number n

Recent Changes

Contribute to this wiki

Why not help others by sharing your knowledge? Contribute something to this wiki and join out hall of fame!
Contact us for a user name and password