nano

>Usage

Nano stands out as a simple and powerful tool for editing files directly from the terminal. It is a command-line text editor.

It’s designed to be user-friendly. Nano provides essential editing features, making it ideal for quick edits, creating configuration files, or writing scripts directly in the terminal.

>Synopsis

nano [option] file

>Short cuts

This is a series of shortcuts that you can use while the nano is open:

  • Ctrl + O: Save the file.Nano prompts you to enter the filename if you haven’t specified one.
  • Ctrl + X: Exit nano. If there are unsaved changes, Nano will ask if you want to save before exiting.
  • Ctrl + K: Move to the line which you want to cut then press this command.
  • Ctrl + U: Go to the position where you want to paste and then press this command.
  • Ctrl + W: This command is used for searching a word in a file. By using this command the editor will ask for a word to search for. Enter the word It will search for the word and will place the cursor in the first letter of the first occurrence of the word.
  • Navigation: Use the arrow keys to move the cursor up, down, left, or right.
  • Editing: Type directly to insert text. Use BACKSPACE to delete characters, and DELETE to delete the character under the cursor.

>Options

-m

This command enables basic mouse support within nano. You can click to move the cursor/select text

Example:

Dots

-nano file.txt

File: file.txt


this is the content of file.txt|.
You are inside the nano editor.

-l

This command Displays the number of each line on the left side of the editor.

Example:

Dots

-nano file.txt

File: file.txt


1 this is the content of file.txt|
2 You are inside the nano editor.
3
4
5
6
7
8
9
10
11
12

-R

This command opens the file in read only mode.

Example:

Dots

-nano file.txt

File: file.txt


this is the content of file.txt.
You are inside the nano editor.

>Quiz

Progress: Question ? out of ?

Question Title

Page written by Gabriele Siliprandi