Written by , Updated on February 4, 2021

Nano is an popular, feature rich command line text editor for Unix/Linux based systems. After the vim/vi a large number of users preferred nano as command line editor. This article describes you to how to search in nano on command line interface.

How to Search in Nano

To search for text in nano, press Ctrl-W (for “Where is…”). You’ll be asked what to search for, Input the text and press the Enter or Return key. In case of match found, the curser will jump to the first matching occurrence. If no match found, a message will displayed as “[ “search string” not found ]”.

The simple step to perform search operation in Nano editor is:

  1. Edit file in Nano
  2. Press CTRL W or F6
  3. Type search pattern
  4. Press Enter to perform search operation
  5. Again use CTRL W and just press enter to search next occurrences
How to Search in Nano Linux Tutorials Nano
Searching a text pattern in nano

Case Sensitive Search in Nano

The default nano search text in case insensitive. It means the search algorithm matches letters in both cases. You can also perform search with case sensitive.

To perform case sensitive search in nano, follow:

  1. Edit file in Nano
  2. Press CTRL W or F6
  3. Press ALT C to enable case sensitive search
  4. Type search string

How to Search in Nano Linux Tutorials Nano

Conclusion

In this tutorial, you have learned about how to perform search in nano text editor.