How to search in Windows Terminal

The Search in Windows Terminal can be useful when trying to find a command you had run before or for a specific file name. Here are a few different ways in which you can use Search function in Windows Terminal.

1] Keyboard Shortcut use

The simplest way to access the Search function in Windows Terminal is to use the Ctrl+Shift+F keyboard shortcut. Once opened, you can type the keyword you’re looking for into the text box and hit Enter to search. You can also open the search dialog with a customized shortcut of your own. To do so, open your settings.json file and search for the find command. By default, this command is set to Ctrl+Shift+F. You can change it to something simple as just Ctrl+F.

This method will configure Windows Terminal to search from the bottom to the top of the text buffer. If required, you can change the search direction (upwards or downwards) by selecting one of the arrows in the search dialog.

3] Searching within panes

The search dialog integrates with panes as well. When focused on a pane, you can open the search dialog. It is visible in the upper-right corner of a pane. Any keyword you enter will show results found within that pane only.

As opposed to other methods, you can add case matching as an option in your search to narrow down your search results. Simply toggle the case matching by selecting the case match button. Now, whenever you perform the search, only those results that match the keyword entered with its specific letter casing will appear.

How do you search in Terminal commands history?

When inside a terminal, hold down Ctrl and press R. This action invokes reverse-i-search. Now, enter a letter – like W to find a match for the most recent command in your history that starts with the same alphabet. Keep typing to narrow down your match. When found, press Enter.