Resident Demigod

Veezus Kreist

Divine missives

Repeating the previous command in bash

July 23, 2010 15:38

As a developer, I’m always looking for ways to keep my hands on the home row when typing. One of the few times I still use the arrow keys on my keyboard is when I want to repeat the previous command in bash. The solution? Use ctrl+p to cycle through previous commands, and ctrl+n to move forward through them.

Thanks, Bernerd!