6 Best Linux Command Line Text Editor

This post may contain affiliate links/ads and I may earn a small commission when you click on the links/ads at no additional cost to you. As an Amazon Affiliate, I earn from qualifying purchases. Techsphinx also participates in the StationX Affiliate program. You can read my full disclaimer here.

Let’s face the fact, we all need text editors.

May it be to create and edit a common text file or modify some configuration file or to write some code.

We already have lots of modern text editors out there on the internet that can do wonders but most of them are GUI.

Linux is known for its powerful terminal. Wouldn’t it be awesome if we have some powerful text editors that work inside the terminal?

For the same, in this post, I present you my 6 best Linux command-line text editor for Linux. 

This list is not in any order; you can use any command-line text editor that suits you.

Best Linux Command-Line Text Editor

1. Vim

linux command line text editor

Vim is one of the most common text editor used by Linux users. It is an improved version of an old command-line text editor known as Vi.

If you are new to Linux, then using Vim can be a daunting task. However, if you managed to overcome a steep learning curve and master this great tool then you can do wonders with it.

Have a look at some of the great features this great tool offers.

Features of Vim

– Cross-Platform support
– Highly configurable for efficient text editing
– Persistent, multi-level undo tree
– Powerful search and replace (Using regex)
– Extensive plugin system (many plugins available to customize Vim)
– Support for hundreds of programming languages and file formats
– Multiple tab support
– Supports Syntax highlighting
– Supports Macro recording and action history

These are some of the interesting features of vim. All these features will be available to you, once you master this powerful tool.

Installation of Vim

Vim comes pre-installed in many popular Linux systems. If it’s not installed on your system, you can follow the installation steps mentioned below.


Check this post: How to install RHEL 8 ? (Explained with Pictures)

$ sudo yum install vim

Fedora 22+

$ sudo dnf install vim

Debian/Ubuntu and its derivatives

$ sudo apt-get install vim

Arch Linux

$ sudo pacman -S vim

2. Nano

linux command line text editor

Too busy with your life? No time to learn Vim? Or you just need a simple text editor to edit some files and get the job done as quickly as possible?

Nano is the answer for all the above questions.

This simple command-line text editor has all the necessary features that you need to edit your day to day files.

If you are new to Linux, Nano may be the best choice for you in terms of simplicity. It is fairly easy to operate and doesn’t have any sort of learning curve.

Although not as powerful and customizable as other text editors on this list, Nano is still mostly used by Linux sysadmins for their daily tasks.

It has what it is made for i.e. simplicity.

Some of its features you’ll get out-of-the-box are mentioned below and you will also see these at the bottom of Nano editor screen.

Features of Nano

– Write out
– Justify
– Read File
– Where is (search)
– Previous page
– Next page
– Cut Text
– Uncut Text
– Cur Pos (Current position)
– Spell check

And many other features that you can use, using the shortcuts which are combined with the Control (Ctrl key) and a particular letter mentioned in the Nano editor screen.

Just like Vim, Nano also comes pre-installed in most Linux based operating system. But if it doesn’t, then you can run the installation command mentioned below.

Installation of Nano


$ sudo yum install nano

Fedora 22+

$ sudo dnf install nano

Debian/Ubuntu and its derivatives

$ sudo apt-get install nano

Arch Linux

$ sudo pacman -S nano

3. Emacs

linux command line text editor

When it comes to text editors, Emacs is in a league of its own. As some say using Emacs is like an OS inside an OS, I say they are not wrong.

It is one of the oldest text editors, available for Unix based systems. The Gnu-Emacs was written in 1984 and is still one of the best text editors available out there.

Just like Vim, Emacs has a steep learning curve but once you master it, the possibilities with this text editor are endless.

Thanks to its developers, Emacs has a very detailed manual that will help users to understand this tool and do some advanced stuff.

To get a clear understanding of this tool, let’s take a peek into some of its features.

Features of Emacs

– Everything that text editors do
– Cross-Platform support
– Both GUI and CLI support
– Powerful and Extensible File Manager
– Commands customization.
– Supports Macro reading
– Full Unicode support for nearly all human scripts.
– Complete built-in documentation, including a tutorial for new users.
– Content-aware editing modes, including syntax coloring, for many file types.
– Customizations beyond a regular text editor

It can be customized beyond text editor for different scenarios using the large collections of modules available, for example – you can have a calendar, project planner, mail and newsreader, debugger interface, word processor, IRC client and even you can play games in it (Not kidding!!).

I have just barely scratched the surface here.

To install Emacs, run the command mentioned below.

Installation of Emacs


$ sudo yum install emacs

Fedora 22+

$ sudo dnf install emacs

Debian/Ubuntu and its derivatives

$ sudo apt-get install emacs

Arch Linux

$ sudo pacman -S emacs

Note: If you run “emacs” command on terminal, it will open Emacs GUI text editor. So use the below command to start a command-line version of it.

emacs -nw myfile.txt

-nw = no window
myfile.txt = Name of file you want to create or edit.

4. NeoVim

By the name, you may have probably guessed it! Yes! NeoVim is a modified version of Vim editor.

The aim of NeoVim is to remove the barrier of entry for new contributors and pave the way for a better community-driven open source project.

This means you’ll get all different kinds of plugins, integrations, interfaces and other out-of-the-box features available to you without a hassle.

Let’s look at some of it distinctive features.

Features of NeoVim

– Cross-Platform support
– API access from many languages
– Embedded, scriptable terminal emulator
– Asynchronous job control
– Compatible with most Vim plugins, including Ruby and Python plugins
– Color support
– Cursor shaping
– Clipboard support
– Sane Defaults (default settings are good and easy for new users)

And many other features and fixes that you won’t find in Vim.

Installation of NeoVim


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

Fedora 22+

$ sudo dnf install neovim

Debian/Ubuntu and its derivatives

$ sudo apt-get install neovim

Arch Linux

$ sudo pacman -S neovim

5. Micro

You have already seen the successor of Vim, so now let’s see a successor of Nano.

Micro is a modern terminal-based text editor which comes as a single binary package without any dependencies and ready for action.

It is intuitive, easy and enjoyable to use for day to day tasks. You’ll also get extensible support using various plugins available for micro.

Let’s take look at some of its great features.

Features of Micro

– Easy to Use
– Cross-Platform support
– Colors and highlighting Support
– Mouse support
– Multiple cursors
– Plugin System
– Split tabs support (You can even open a terminal inside micro)
– Common and customizable keybindings
– No dependencies and Sane defaults
– Simple auto-completion and Persistent undo
– Macros support

And many other great features that you’ll get out-of-the-box with micro.

Installation of Micro


$ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
$sudo yum install micro

Fedora 22+

$ sudo dnf install micro

Debian/Ubuntu and its derivatives

$ sudo apt install micro

Arch Linux

$ sudo pacman -S micro

6. Ne (The Nice Editor)

The official site of ne clearly states:

“If you have the resources and the patience to use emacs or the right mental twist to use vi then probably ne is not for you.”

Ne is an advanced text editor like Vim or Emacs, but with an easy, powerful, fully configurable, fast and resource sparing capabilities which makes it a great editor for both beginners and advanced users.

Let’s take a look at its distinctive features.

Features of Ne

– Customizable menu and keystrokes
– Syntax highlighting
– Full support for UTF-8 files, including multiple-column characters
– 64-bit file/line length
– Macro support
– Unlimited undo/redo capability (can be disabled with a command);
– Auto-completion
– File requester with completion features for easy file retrieval
– An extended regular expression for search and replace
– A very compact memory model (you can easily load and modify very large files, even if they do not fit your core memory)
– Editing of binary files
– Uses little bandwidth, great for remote file editing

And many more interesting features.

Installation of Ne


$ wget http://ne.di.unimi.it/ne-3.3.0-1.x86_64.rpm
$sudo yum install ne

Fedora 22+

$ sudo dnf install ne

Debian/Ubuntu and its derivatives

$ sudo apt install ne

The Bottom Line

If you are a Linux user for quite a while you may have heard about some of these command-line editors especially Vim, Nano and emacs.

There are a lot of command-line text editors available for Linux. This was my list of best Linux command-line text editor.

Which Linux command line text editor you like the most to work with?

If you know about any great text editor, then share it with me in the comments.

If you like this post, then follow Techsphinx on Facebook and Twitter for more reviews, tricks, tips and tutorials.

This article needs update or correction? Report the issue here so I can update it.

Like it? Share with your friends!

Rahul R Nair

Rahul is obsessed with technology and electronic devices. He is also the founder of TechSphinx. Being a technophile, he is always busy doing some techy stuff or learning about the latest technologies. When not busy with his usual routine (staring at the computer screen) he likes to write and share his knowledge with the world.
Notify of
1 Comment
Oldest Most Voted
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x