How to Search in the Nano Editor

Nano is one of the most commonly used text editors for Unix and Unix-like devices. It was created to “replace” the pico text editor. The nano team has implemented many options that simply pico doesn’t have, such as: search and replace, go to the line and column number, etc. This guide aims to show you how to search in the nano editor.

Search in the Nano Editor

Searching in the nano editor is really easy, to search simply hit the following keys on your keyboard:

CTRL + W

Then a small window at the bottom of your screen will appear. This is where you’ll type the exact term you are looking for, then hit enter to start searching.

search in the nano editor

Skip results in Nano editor

Let’s say that there’s a word on a specific line you are looking for, and this word is repeated multiple times on lines you are not interested in.

To skip to the next matching search term, simply hit again CTRL+W and then ENTER until you have found what you are looking for.

The video below also shows how I’ve skipped multiple times while searching for the same term.

Case sensitive search in Nano

The default CTRL+W search is not case sensitive, therefore, it will take you to every word that matches your search. But, thankfully nano has a case sensitive search option which can be triggered by hitting the following key combinations on your keyboard after launching the default search function:

CTRL+W #Regular search function
then, hit 
ALT+C

Summary

To summarize, you’ve learned how you can easily search on the nano editor, as well to skip searches and lastly make case-sensitive searches in nano.

Leave a Comment