ctrl-r
to search through command history (after pressing, type to search, press ctrl-r
repeatedly to cycle through more matches, press Enter
to execute the found command, or hit the right arrow to put the result in the current line to allow editing).