Sample Header Ad - 728x90

Search bash history for already typed command

13 votes
2 answers
11806 views
When I type ctrl+r and *then* start typing I can see what commands in the history match which is great. Now is there a way to search the history on commands I have *already* typed in the terminal? For example if I type ctrl+r and then type ping I can cycle through servers I have pinged. But if I type "ping" first and then hit ctrl+r it ignores the "ping" I have already typed. Some times I'll get half way though typing out a string of commands and then think "oh I already typed this it sure would be nice to search the history on what I have already typed instead of starting over". Does this make sense what I am asking?
Asked by user1028270 (1104 rep)
Mar 5, 2016, 01:20 AM
Last activity: Feb 18, 2025, 03:44 AM