1.5 KiB
1.5 KiB
-
Opening and Creating Files:
- To open an existing file or create a new one, type:
nano filename - Replace
filenamewith the actual name of the file you want to edit. Nano will open the file in a new editor window.
- To open an existing file or create a new one, type:
-
Basic Editing:
- Nano is modeless, meaning you can start typing and editing immediately.
- To move the cursor to a specific line and character number, use
Ctrl+_. Enter the line and column numbers when prompted. - To save your changes and exit, press
Ctrl+x.
-
Searching and Replacing:
- To search for text, press
Ctrl+w, type your search term, and pressEnter. - To move to the next match, press
Alt+w. - For search and replace, press
Ctrl+\. Enter the search term and the replacement text.
- To search for text, press
- (1) Editing Files With Nano in Linux [With Cheat Sheet] - It's FOSS.
- (2) The Beginner's Guide to Nano, the Linux Command-Line Text Editor.
- (3) nano Command Guide | Linux Text Editor Explained.
- (4) Getting Started With Nano Editor - Linux Handbook.
- (5) First steps with the Nano text editor - PragmaticLinux.
- (6) How to Use Nano Text Editor: From Installation to Editing - Hostinger.