Home Reverse colors Help
Single page Previous Contents Next

Introduction to GNU/Linux
24 / 102

Command Line History

Key (combination) Action
Arrow Up Move up
Arrow Down Move down
Ctrl + R Search command history.
Event designators, and lines they reference in the history list.
Event designator Reference
!n Refer to command line n.
!-n Refer to the current command line minus n.
!! Refer to the previous command (same as !-1).
!string Refer to the most recent command starting with string.
!?string? Refer to the most recent command containing string.
^string1^string2^ Repeat the last command, replacing string1 with string2.

man history to know more and learn about Word Designators and Modifiers.

Previous Contents Next