How to Install Nano Text Editor in Linux – A Simple, Modeless Text Editor for Linux
In this article, we will learn How to Install Nano Text Editor in Linux – A Simple, Modeless Text Editor for Linux. The GNU Nano is an simple and easy-to-use text editor that was originally designed as a replacement for Pico, the NCRES-based editor of the non-free mailer package Pine. However, GNU also implements a number of features missing in the Nano Pico, including: – Undo / Repeat – Line Numbering – Syntax Coloring – Soft wrapping of overlaid lines – Text selection by holding Shift – Interactive search and replacement (with regular expression support) – A Go -To Line (and Column) Commands – Support for Multiple File Buffers – Auto-Indentation – Complete Tabs of Filenames and Search Terms – Toggle Features on the Run – and Full Internationalization Support.
Follow the below steps to install Nano Text Editor in Linux – A Simple, Modeless Text Editor for Linux:
Before installing the Nano Text Editor, we will need to install the required PPA repositories. To do so follow the command below.
itsmarttricks@mangesh:~$ sudo apt update
Install Nano Text Editor in Debian/Ubuntu:
To install Nano text editor on Debian/Ubuntu machines, execute the following command:
itsmarttricks@mangesh:~$ sudo apt install nano
Install Nano Text Editor in CentOS/Fedora/RHEL:
We can run this command to install Nano text editor on CentOS/Fedora/RHEL based platforms:
itsmarttricks@mangesh:~$ yum install nano
How to Open and Close the Nano Editor?
The main syntax for opening Nano and editing a specific file:
Suppose we have a demo.txt. We want to open a file named. The command will look like this:
You can open .txt, .php, .html and many more. Just remember that if you want to open a specific file, you need to be in the directory where that file is located.
However, if you are in another folder and you want to open a file (demo.txt) in the / path / to / directory, you can enter this line instead:
Useful keyboard shortcuts for navigating include:
- move forward one character: Ctrl+F (^F)
- move back one character: Ctrl+B (^B)
- move forward one word: Ctrl+Space (^Space)
- move back one word: Alt+Space (M-Space)
- move to the previous line: Ctrl+P (^P)
- move to the next line: Ctrl+N (^N)
- move to the next page: Ctrl+V (^V)
- move to the previous page: Ctrl+Y (^Y)
- move to the beginning of the line: Ctrl+A (^A)
- move to the end of the line: Ctrl+E (^E)
That’s all, In this article, we have explained How to Install Nano Text Editor in Linux – A Simple, Modeless Text Editor for Linux. I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment.