
A text editor is a must-have application for any operating system. We have no dearth of the best modern editors for Linux. But those are GUI based editors.
But, for a lot of good reasons, you still need to utilize the command-line. Not just for System Administrators but for the average user as well. Hence, text editors tailored for the terminal is definitely something important.
Here, I’ll compile a list of the best command line text editors for Linux.
Classic Command Line Text Editors
These are some of the most commonly-used and powerful command-line text editors for Linux.
1. Vim

If you’re on Linux for quite some time, you must have heard about Vim. Vim is an extensively configurable, cross-platform, and a highly efficient text editor.
It may not be suitable for newbies but it’s something every aspiring Linux System administrator should get comfortable with. You will probably find it pre-installed in your Linux distribution. It is extremely popular for its wide range of advanced features.
Vim can be quite agonizing for first-time users. I remember the first time I tried to edit a text file with Vim, I was completely puzzled. I couldn’t type a single letter on it and the funny part is, I couldn’t even figure out how to close this thing. If you are going to use Vim, you have to be determined for climbing up a very steep learning curve.
But after you have gone through all that, combed through its official documentation, and practice the commands/operations, you’ll find it worth all the time spent. Not to forget, you can use it for basic text editing or leverage its support for hundreds of programming languages, extensions and file formats.
How to install it?
If you don’t have it installed already, you can just try typing in the command (on Debian-based systems) to install it:
sudo apt install vim
You can also find it listed in your software center of the Linux distribution you use. In either case, just head on to its official download page to get more details.
2. GNU Emacs

GNU Emacs is undoubtedly one of the oldest and versatile text editor out there. In case you didn’t know, it was created by GNU Project founder Richard Stallman.
Emacs is cross-platform and has both command-line and a graphical user interface. It is also very rich with various features and, most importantly, extensible.
Just as Vim, Emacs too comes with a steep learning curve. But once you master it, you can completely leverage its power. Emacs can handle just about any types of text files. The interface is customizable to suit your workflow. It supports macro recording and shortcuts as well.
The unique power of Emacs is that it can be transformed into something completely different from a text editor. There is a large collection of modules that can transform the application for using in completely different scenarios, like — calendar, news reader, word processor etc. You can even play games in Emacs!
How to install it?
You should find it in your software center or if you prefer using the terminal on Ubuntu-based distros, you can type in:
sudo apt install emacs
You can find more information on it in their official download page. Once you’re done installing, you need to type in a specific command to launch emacs in your terminal, which is:
emacs -nw
Basically, this command instructs to not include any window to launch the program but the terminal itself.
3. Nano

When it comes to simplicity, Nano is the one. Unlike Vim or Emacs, it is suitable for beginners to get used to quickly.
If you want to simply create & edit a text file, look no further.
The shortcuts available on Nano are displayed at the bottom of the user interface. It is minimal and perfectly suitable for editing system & configuration files. For those who don’t need advanced features from a command-line text editor, Nano is the perfect pick.
If interested, you can learn how to use Nano text editor in our beginner’s guide.
How to install it?
For the most part, Nano editor should come in pre-installed on Ubuntu-based distributions. If it isn’t there, you can simply visit the official download page to get the binaries for the distribution you want.
Modern Text Editors For Command Line
Here, I shall list some terminal-based text editors that bring something new to the table or focus on making things easier.
4. ne – The Nice Editor

When compared to the classic and popular text editors, ne (the nice editor) is a good alternative which tries to offer advanced functionalities and making it easier to use them.
In other words, it’s a simpler alternative to Vim/Emacs offering you powerful features. It is being actively maintained — but not as regular as you’d expect. However, I tried it installing on Pop OS 20.04 and it worked just fine. You can explore more about it in their GitHub page.
Of course, unless you test it extensively, you should take it with a pinch of salt.
How to install it?
You should find it available in the official repositories of your Linux distribution. For Ubuntu-based distros, you can install it using the command:
sudo apt install ne
You can also check out their official download page for more information on other Linux distributions.
5. Neovim

Neovim is a fork of Vim that aims to add more extensibility while simplifying it. If you’re comfortable with Vim, you will be good to go using Neovim.
The project is being actively maintained and the progress is promising so far. Of course, unless you’re acquainted with how Vim works, you may not notice the striking difference between the two.
But, overall, Neovim tries to take Vim up a notch.
How to install it?
For Ubuntu-based distros, you can simply install it by typing:
sudo apt install neovim
For other Linux distributions or platforms, you may refer to its official installation instructions to get started.
To give you a head start, I must mention that when using the terminal, you will have to type the following to launch it (instead of neovim):
nvim
6. Tilde

Tilde is a terminal-based text editor tailored for users who are normally used to GUI applications.
Unlike other options mentioned in this list — this may not be a power tool. But, for basic text editing operations, this is very easy to use. You do have some advanced functionality – but that’s not something to compare with Vim/Emacs.
If you wanted to try something easy-to-use and different, this is the one I’d recommend you to try.
How to install it?
For Ubuntu-based distros, you can simply type the following command in the terminal:
sudo apt install tilde
For information on other Linux distributions, you may refer to their GitHub page or the download page to explore more about it.
Wrapping Up
If you are an experienced Linux user, you must be aware of the popular options mentioned in this list.
Even though there are some good-old options like WordGrinder and JOE — I’m afraid that they are no longer actively maintained.
What do you think of the best command line text editors for Linux listed in this article? Did I miss any of your favorites? Let me know your thoughts in the comments below!
It is TRULY the best selection of Linux editors I have seen, after looking at many reviews/web sites.
There appears to be something seriously odd about Linux geeks, as the most mentioned editors on other sites, look so primitive and cumbersome, and Linux people put up with such difficult to use/unpleasant/inefficient products. There is nothing smart in having to remember 100s of special commands/keystrokes, just to edit a file, even if you are writing code (for which one should use a decent IDE anyway; and not vi/vim or emacs).
I began my career in the Unix world, and got used to vi (which I hated; still do). After managing IT teams for years, which developed software using Windows tools, I am shocked to see that the world of Linux is still stuck in the past, with primitive interfaces and editors.
But the tools such as – ne, which you mention in your article, are sufficient and much easier to use for editing config files. There is no need for complicated and weird keystrokes!
Good post.
Thanks for your feedback, Mike.
Hi, please look at my favorite text editor Multitextor.
https://github.com/vikonix/multitextor
WHat about Midnight Commander and mcedit? It seems better to any of the listed CLI editors
Mousepad
How about ed, it is after all the standard editor.
Is it? Are you sure? On many distributions, it’s just points to Vi.
ed used to be and it was included in a lot of Unix operating systems but like 3 years after vi became the standard. Ed was just too limited.
This is the reason why it is not included in this list. It has a place in history but it’s hardly used anymore.