Pentarock Technologies

SHARING KNOWLEDGE

Best 3 Command Line Editor for Linux

5 min read

In this article we will have a look at the best 3 command line editor for Linux. However, having knowledge of editing text files fast and efficiently is must for the users of Linux operating system. Moreover, text file editing is a day to day job of Linux users and administrators. Additionally, in Linux operating system various configuration files and other files are in text format.  Therefore it is best to have a good command line text editor on your system. Therefore, in this article we are giving a brief description of some of the most popular open source and free command line editors for you.

1. Nano Command Line Editor

The number one in the best 3 command line editor for Linux is the Nano Command Line Editor. Nano The Command Line Editor is a free and open source command line editor available under GNU general public license. However, it is an easy to use simple WYSIWYG (What You See Is What You Get) text editor. Also, it has simple and intuitive graphical user interface that enables the users to directly interact with the entered text.

Best 3 Command Line Editor for Linux

Default Editor in Many Linux Distros

Furthermore, Nano  Command Line Editor is the default editor in many Linux distros and is installed by default with the operating system installation. However, if Nano editor is not available in your distribution, it can be installed separately.

Installation Procedure

In the case you want to install Nano in Ubuntu, Debian and the similar distributions follow the installation steps given below.

Open the terminal window first.

Issue the following commands in the terminal window to install Nano.

$ sudo apt update
$ sudo apt install nano

Also, to install Nano in CentOS, Fedora and the similar distributions follow the installation steps given below.

Open the terminal window first.

Issue the following commands in the terminal window to install Nano.

$ yum install nano

How to use Nano Editor

Nano Command Line Editor Usage

To create or open a new file in Nano Editor Issue the following command in the terminal windows

$ nano filename

If the given file is non-existent then the Nano editor will open a new file with the filename given as argument, else it will open the file for editing.

To save a file in Nano Editor, the keyboard shortcut is

Ctrl+o

When you will press the above key combination the editor will ask for the filename, here you can give a new filename or if required you can modify the existing file name.

To exit the Nano Editor issue the keyboard shortcut

Ctrl+x

The editor will prompt for saving the file, respond with ‘y’ to save the file else press ‘n’ to discard the changes made.

To cut required text string in a file use

Ctrl+k

For pasting required Text string in a file use

Ctrl+u

To search any word in a text file the keyboard shortcut used is

Ctrl+w

on pressing Ctrl+w and supplying the search string the cursor will move to the first occurrence of the search string. The spell check feature in Nano may be enabled by installing the spell check package.

$ sudo apt install spell

Below is the link to the official website of Nano Editor.

Official Website: Official Website of Nano

2. Emacs Command Line Editor

Next in the list of the best 3 command line editor for Linux is Emacs Command Line Editor. Emacs command line editor was first released on March 20, 1985. Moreover, it is an open source and freely available application under GNU general public license.

Best 3 Command Line Editor for Linux

Flexible and Powerful Editor

It is perhaps the most flexible and powerful command line text editor. Also, it has great text editing features. However, Emacs is not only a text editor but it can be extended with various modes that can enable it to work like an integrated development environment for most of the major programming languages like Python, C and Java etc.

Installation Procedure

To check whether your Linux system has the Emacs editor. Open the terminal window and run the following command.

$ emacs

If the Emacs editor is already there. We will get a welcome message in the terminal window.

To install Emacs editor on various Linux distributions follow the below given steps.

Open the terminal windows first then execute the commands as given below.

To install Emacs on CentOs execute the following command in the terminal window.

# yum install emacs

To install Emacs editor on Ubuntu, Debian or similar Linux distributions Open the terminal window and issue the following command.

# apt-get install emacs

The installation of Emacs is quite easy. After executing the above commands, allow the installer to install the product. The Emacs editor will be installed automatically on your Linux distro. Now it will be ready to use.

Conclusion

To launch Emacs editor simply issue command “emacs” or give a filename as an argument to this command. If the file is non-existent then Emacs will create a new file or if the file exists then it will open the existing file and show the already existing text of the file in an editing window.

There is a detailed user’s manual is available on the official website of Emacs along with the detailed installation procedures for various operating systems and Linux variants.

A link to the official website of the Emacs editor is given below.

Official Website: Official Website of Emacs Command Line Editor

3. Vim Command Line Editor

Vim Command Line Editor is another popular command line editor in the list of the best 3 command line editor for Linux. This editor is free and open source text editor. It is available under GPL general public license. Vim text editor is extremely configurable text editor. This property of Vim makes it very structured text editor for creating and changing text. Linux Vim editor is the,  Vi editor of the older UNIX systems and Apple’s OS X.

Best 3 Command Line Editor for Linux

Most Stable Text Editor

Vim text editor is the most stable text editor in its class and it is being further developed to make it even better. Below given are the main features of the Vim Text editor.

Vim text editor supports multi-level undo tree. Vim editor has an extensive plugin system that makes it more powerful and versatile text editor. It supports more than one hundred programming languages and file formats, thanks to its large community of developers. Perhaps Vim text editor has one of the most powerful search and replace feature.

Vim is a state-of-the-art command line text editor that helps its users by providing the power of the Unix Editor ‘Vi’ that too with a more extensive feature set.

Programmers’ Editor 

Vim is also often known as programmer’s editor. It is so convenient text editor for programming that many of its users consider it as an Interactive Development Environment. Vim editor is not only convenient and impressive text editor for programmers but Vim is ideal for all kinds of text creation and editing. It is very helpful and easy for writing emails to editing configuration files.

We can configure Vim editor in such a way that it works very much  like the Notepad editor and also known as “evim” or Easy Vim.

Below given is the link the official website of Vim Command line text editor for further reading.

Official Website: Official Website of Vim Text Editor

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.