# Ubuntu – How to search the command-line history for commands I used before

command line

Other than viewing the history, is there a way to filter my history?

Say I want to search for a command that started with "ssh"?

• Press Ctrl+R and type ssh. Ctrl+R will start search from most recent command to old one (reverse-search). If you have more than one command which starts with ssh, Press Ctrl+R again and again until you find the match.