Written by Rahul, 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:
- Edit file in Nano
- Press
CTRL
W
orF6
- Type search pattern
- Press Enter to perform search operation
- Again use
CTRL
W
and just press enter to search next occurrences
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:
- Edit file in Nano
- Press
CTRL
W
orF6
- Press
ALT
C
to enable case sensitive search - Type search string
Conclusion
In this tutorial, you have learned about how to perform search in nano text editor.