Lecture # 11 - Nano Text Editor

Opening file with nano:

To open file in nano nano [file-name] command is used. If there is already a file with the name entered, this command will open that existing file otherwise a new file will be created and opened in nano editor.

By running the command nano new.txt this empty buffer will be opened.

Shortcut Keys:

  • ctrl + G: This shortcut key is used to display the help menu.

  • ctrl + o: This shortcut key is used to save the current file to disk.

    After pressing 'enter' key, this file will be saved.

  • ctrl + w: This shortcut key is used to search for a specific string in the text.

    If you enter any string and press enter the string entered will be searched.

  • ctrl + k: This shortcut key is used to cut the current line or marked text.

  • ctrl + u: This shortcut key is used to past the last cut text.

  • ctrl + A: This shortcut key is used to move the cursor to the beginning of the current line.

  • ctrl + e: This shortcut key is used to move the cursor to the end of the current line.

  • ctrl + y: This shortcut key is used to scroll up one screen.

  • ctrl +v: This shortcut key is used to scroll down one screen.

  • ctrl + c: This shortcut key is used to show the current position of the cursor.

  • Alt + a: This shortcut key is used to mark the text from the cursor position to the beginning of the line.

  • ctrl + p: This shortcut key is used to move cursor to the previous line.

  • ctrl + n: This shortcut key is used to move cursor to the next line.

  • ctrl + f: This shortcut key is used to move cursor forward one character.

  • ctrl + b: This shortcut key is used to move cursor backwards one character.

  • alt + G: This shortcut key is used to go to the line and column number.

  • ctrl + m: This shortcut key is used to insert a new line at the cursor position.

  • ctrl + d: This shortcut key is used to delete the character under the cursor.

  • ctrl + h: This shortcut key is used to delete the character before the cursor position.

  • ctrl + s: This shortcut key is used to save the current file.

  • ctrl + x: This shortcut key is used to exit from the nano editor.

0
Subscribe to my newsletter

Read articles from Abdullah Bin Altaf directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Abdullah Bin Altaf
Abdullah Bin Altaf