nano editor in Linux

nano is a basic text editor in Linux.

Main features of nano are given below.

  1. very easy and short learning curve
  2. shortcuts to important actions are given at the bottom of editor
  3. very easy for someone coming from windows background

The drawback of nano is that it does not provide syntax highlighting and many other features available in vim.

To start the nano editor from shell, you can execute below command.

nano filename

Then you can start editing the file. We do not have insert and command modes (available in vim) in nano.

Here are some of the shortcuts in nano.

  1. Ctrl + o – To save the file you can use ctrl+o hotkey.
  2. Ctrl + x – This hotkey is used to exit the nano editor.
  3. Ctrl + w – This hotkey is used to find the text in a file in nano editor.
  4. Ctrl + r – load the specified file in nano
  5. Alt + k – Select the text
  6. Ctrl + k – Cut the text
  7. Ctrl + u – Paste the selected text
  8. Alt + / – This hot key can be used to go to the end of file
  9. Ctrl + a – This hot key can be used to go to the beginning of current line
  10. Ctrl + e – This hot key can be used to go to the end of current line
  11. Ctrl + c – shows current position of the cursor like line number, column number etc
  12. Ctrl – (dash) – This command will let you jump to specific line number in a file
  13. Ctrl + w – Allows you to find the  text in a file. To find the next occurrence, you can use Alt + w command.

You may also like...