Sunday, November 22, 2026
TR
LinuxOpen Source

How to Search in Nano

How to Search in Nano

Nano is a popular, feature-rich command-line text editor for Unix / Linux based systems. After Vim / vi, a large number of users have chosen nano as their command-line editor. This article explains how to search in nano on the command-line interface.

How to Search in Nano

To search for text in nano, press Ctrl-W (for "Where is..."). You will be asked what to search for. Enter the text and press Enter or Return. If a match is found, the cursor will jump to the first occurrence of the match. If no match is found, a message such as "[" search string "not found]" is displayed.

Here are the simple steps to perform a search in the nano editor:

  1. Open the file for editing in nano
  2. Press CTRL+ W or the F6 key
  3. Type the search pattern
  4. Press Enter to perform the search
  5. Use CTRL+ W again and just press Enter to search for the next occurrences

Case-Sensitive Search in Nano

By default, nano search is case-insensitive. This means the search algorithm matches letters in either case. You can also search in a case-sensitive way.

To perform a case-sensitive search in nano, follow these steps:

  1. Open the file for editing in nano
  2. Press CTRL+ W or the F6 key
  3. Press ALT+ C to enable case-sensitive search
  4. Type the search string

Kerim Koç

Systems and infrastructure engineer. I write about Linux, open source, high availability and security.