8 Best Command Line based text editors for Linux

Last Updated: 

LIST

8 Best Command Line based text editors for Linux

Looking for the Best Command Line Based Text Editor for Linux, then here is a curated list of best terminal based text editor for Linux.

A text editor gives you the ability to edit files like configuration files, documents, and source code files. The first text editors were "line editors" oriented to teleprinter- or typewriter-style terminals without displays. When computer terminals with video screens became available, screen-based text editors became common.

Read: Basic Linux Commands That Every User Should Know

Every operating system provides its own default text editor. Microsoft Windows systems come with Notepad, macOS comes with TextEdit. For Linux, there are a lot of text editors available both GUI and Command Line based. However, in this article, we are only gonna talk about some of the best command line based text editors for Linux.

1. Vim

Vim best command line based text editor for linux

Vim is the most popular Command Line based text editor. Vim is highly configurable and is enables efficient text editing. It can be used for programming to edit source code files. Vim can be configured to work the way you like. To master Vim, you need to learn about all its features and functionalities. It is a tool, the use of which must be learned.

Vim has a built-in tutorial for beginners called vimtutor, it exists as a separate executable and can be run with a shell command. Apart from that Vim also has a built-in help facility that can be accessed using :help command.

Vim allows users to customize their text editing environment. Users can execute complex commands with "key mappings," which can be customized and extended.

Furthermore, users can create macros that can be used to automate repeated tasks. There are many plugins available for Vim, these plugins are written in Vim’s internal scripting language known as vimscript.

To install vim type this command in your terminal:

For Debian based distros

sudo apt install vim

For RHEL, CentOS and Fedora

sudo dnf install vim

For Arch based distros

sudo pacman -S vim

2. GNU nano

GNU nano

GNU nano is a cross-platform text editor using command line interface. Nano was created as a replacement for Pico, which was not distributed under a free software license. Although GNU nano doesn’t provide as many features and customizations as Vim, it still is useful when you just want a text editor that gets the job done.

GNU nano provides syntax highlighting, line numbers, regular expression search and replace line-by-line scrolling, and the undoing and redoing of edit changes.

GNU nano comes preinstalled on many Linux distributions. However, you can install it using the following command:

For Debian based distros

sudo apt install nano

For RHEL, CentOS and Fedora

sudo dnf install nano

For Arch based distros

sudo pacman -S nano

3. GNU Emacs

GNU Emacs best terminal based text editor

GNU Emacs is another popular cross-platform text editor. GNU Emacs is a highly customizable text editor. GNU Emacs has over 10,000 built-in commands which can be combined into macros for task automation.

GNU Emacs include features like content-aware editing modes, including syntax coloring, for many file types, Full Unicode support, and a packaging system for downloading and installing extensions.

GNU Emacs is available both as a GUI and Command Line Interface. The command line variant of GNU Emacs can be downloaded using the following command:

For Debian based distros

sudo apt install emacs-nox

For RHEL, CentOS and Fedora

sudo dnf install emacs-nox

For Arch based distros

sudo pacman -S emacs-nox

4. Neovim

Neovim

Neovim is a continuation and extension of Vim. It is not an exact clone of Vim but contains only the good parts of Vim. Neovim can be thought of as a leaner version of Vim. Neovim avoids features that cannot be provided on all platforms.

Being a leaner version of Vim doesn’t mean it doesn’t have the extensibility and customizability of Vim. Neovim is packed with features like support for remote plugins, vimscript parser, support for macros, and many more features of Vim.

Read: Best Download Managers For Linux

Users of Vim will find no difficulty at all in using Neovim.

To install Neovim type this command in you terminal:

For Debian based distros

sudo apt install neovim

For RHEL, CentOS and Fedora

yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum install -y neovim python3-neovim

For Arch based distros

sudo pacman -S neovim

5. Micro

Micro popular console based text editor for linux

Micro is yet another popular command line based text editor for Linux. It has a nice and modern-looking user interface and is easy to use. Just like other text editors, Micro can be customized to your liking.

Some of the features of Micro include support for over 75 languages and has 7 default color schemes, support for Sublime-style multiple cursors, and mouse support.

Micro also provides support for plugins and it comes with its own plugin manager which can be used to download and install plugins.

To install Micro type this command in your terminal:

For Debian based distros download the .deb binary from the following link and then run the following command (before running the command given below make sure you are in the directory where the binary is downloaded)

sudo dpkg -i ***binary name that you downloaded***

For RHEL, CentOS and Fedora

sudo dnf install micro

For Arch based distros

sudo pacman -S micro

6. ne

ne

ne is a free (GPL'd) text editor for Linux. ne is easy to use and is highly configurable. ne is for those users who need a lightweight text editor that gets the job done, then ne is the perfect option for them.

Some of the things that make ne different from other command line based text editors is that it is easy to set up, is fast, and uses less bandwidth (ideal for editing files over slow GSM/GPRS/UMTS connections).

Features of ne include syntax highlighting, full support for UTF-8 files, 64-bit file/line length, unlimited undo/redo capability, and automatic completion of prefixes using words in your documents as dictionary.

ne can be installed by running the following command in your terminal:

For Debian based distros

sudo apt install ne

For RHEL, CentOS and Fedora

sudo dnf install ne

For Arch based Linux distros

sudo pacman -S ne

7. Tilde

Tilde

Tilde is another command line based text editor which also comes with a GUI interface for people who are accustomed to the graphical interfaces.

Tilde is easy to use and contains all the basic features that a text editor should have. Tilde provides some features but they are not up to par with what other text editors provide.

Tilde is recommended for those users who need a retro-looking text editor with all the basic functionalities to get the job done.

Tide can be installed using the following commands:

For Debian based distros

sudo apt install tilde

For RHEL, CentOS and Fedora

sudo dnf install tilde

For Arch based Linux distros

sudo pacman -S tilde

8. Kakoune

Kakoune

Kakoune is a powerful command line based text editor for Linux. It is highly customizable and supports client-server architecture. It is similar in functionality to Vim text editor.

Kakoune comes with many features including regex matching, support for macros, syntax highlighting, and support for many programming languages.

Kakoune also supports client/server architecture which allows you to collaboratively edit the same file. Apart from that Kakoune also supports advanced text manipulation primitives, extensive auto-completion, and offers multiple text editing tools.

Kakoune can be installed using the below commands:

For Debian based distros

sudo apt install kakoune

For RHEL, CentOS and Fedora

sudo dnf install kakoune

For Arch based Linux distros

sudo pacman -S kakoune

Final Words: Command Line text editors for Linux

These were some best Command Line based text editors for Linux. Some of the above-mentioned text editors like Vim, Emacs, etc. have a bit of a learning curve, while some text editors like ne, nano are simple and easy to use.

If you just want something that is easy to use and doesn’t have that much of a learning curve then try text editors other than Vim, Emacs, and Kakoune.

Read: How To Zip Files and Folders in Linux

So go ahead and give these text editors a try and if you think that there is a text editor that needs a mention here then feel free to drop your suggestions in the comment section.

If you liked the article, consider following us on Twitter to get the latest tech news and updates.

Share

Tags:  unixlinuxtext-editorconsoleterminal
Dinker Thakur

Dinker Thakur is a tech enthusiast who loves to write and read about technology. His area of interest include Artificial intelligence, IT security and consumer electronics.