2  Nano Text Editor

2.1 Introduction

The Nano text editor is renowned for its simplicity, making it an ideal choice for beginner. It’s the go-to for straightforward text file modifications via the command line.



2.2 Quick Start

  1. Open files with:
nano file.txt
  1. Use the arrow keys to navigate the file.
  2. Edit the file as needed.
  3. Save changes with Ctrl + O.
  4. Confirm the file name and press Enter to save.
Note

You can now exit Nano with Ctrl + X.

2.3 Searching Text

To find words or phrases within a file, use the following steps:

  1. Initiate a search with Ctrl + W.
  2. Enter your search term.
  3. Press Enter to search.

Exit search with Ctrl + C.

2.4 Customizing Nano

Enhance Nano’s functionality:

nano -miA file.txt
  • m: Enables mouse support.
  • i: Auto-indents new lines.
  • A: Improves scrolling.

These options enhance Nano’s usability, making it a versatile tool for text editing. Nano’s efficiency and user-friendly design make it a preferred choice for command-line editing tasks.