My Favorite Command Line Editors for Linux – What’s Your Editor?

Linux Command Line Text Editors

Top 3 Linux Command Line Text Editors

Knowing how to fast and effectively edit files via command line is vital for every Linux system administrator. File edits are performed on a daily basis, whether it’s a configuration file, user file, text document or whatever file you need to edit.

This is why it is good idea to pick a favourite command line text editor and master it. It’s good to know how to work with other text editors, but you should master at least one so you can perform more complex tasks when needed.

In this tutorial, we are going to show you the most common command line text editors in Linux and show you their pros and cons.

Note however that we will not cover a complete guide how to work with each one of them as this can be a complete other article with explanation.

1. Vi/Vim Editor

First in our list is the infamous Vi/Vim (Vim comes from Vi improved). This is a very flexible text editor that can perform many different operations on text.

Vi/Vim Linux Editor

Vi/Vim Linux Editor

For example you can use regular expressions to replace text snippets in a file using vim. This of course is not the only benefit. Vi(m) provides an easy way to navigate between lines, words paragraphs. It also includes text highlighting.

Vim may not be the most user friendly text editor, but it is often preferred by developers and Linux power users. If you want to install this command line text editor on your system, you can use the command associated with your OS:

Install Vi/Vim Editor in Linux

$ sudo apt-get install vim         [On Debian and its derivatives]
# yum install vim                  [On RedHat based systems]
# dnf install vim                  [On newer Fedora 22+ versions]

If you want to see our complete coverage of vi(m), please follow the links below:

  1. Learn and Use Vi/Vim as a Full Text Editor in Linux
  2. Learn ‘Vi/Vim’ Editor Tips and Tricks to Enhance Your Skills
  3. 8 Interesting ‘Vi/Vim’ Editor Tips and Tricks

2. Nano Editor

Nano is probably one of the most used command line text editors. The reason for this is it’s simplicity and the fact that it’s preinstalled in most of the Linux distributions. 

Nano Editor for Linux

Nano Editor for Linux

Nano doesn’t have vim’s flexibility, but it will definitely do the work if you need to edit a large file. Actually pico and nano are quite similar. Both have their command options displayed at the bottom so you can choose which one to run. Commands are completed with key combinations of Ctrl and a letter displayed at the bottom.  

Nano has the following features that you can use out of the box:

  1. Get Help
  2. Write out
  3. Justify
  4. Read File
  5. Where is (search)
  6. Previous page
  7. Next page
  8. Cut Text
  9. Uncut Text
  10. Cur Pos (Current position)
  11. Spell check

Install Nano Editor in Linux

$ sudo apt-get install nano         [On Debian and its derivatives]
# yum install nano                  [On RedHat based systems]
# dnf install nano                  [On newer Fedora 22+ versions]

You can check our complete guide for editing files with Nano editor on this link:

  1. How to Use Nano Editor in Linux

3. Emacs Editor

This is probably the most complex text editor in our list. It’s the oldest command line editor available for both Linux and UNIX based systems. Emacs can help you be more productive by providing an integrated environment for different kinds of tasks.

Emacs Editor for Linux

Emacs Editor for Linux

At first the user interface may look somehow confusing. The good thing is that emacs has a very detailed manual that will help you with file navigation, edits, customization, setting up commands. Emacs is the ultimate tool used by advanced *Nix users.

Here are some of the features that make it the preferred choice over the previous editors we mentioned:

  1. Emacs server platform enables multiple hosts to connect to the same Emacs server and share the buffer list.
  2. Powerful and extensible file manager.
  3. Customization beyond a regular editor – as some say it’s an OS within the OS.
  4. Commands customization.
  5. Can change to Vi(m) like mode.

Emacs is a multi-platform editor and can be easily installed with the commands shown below:

Install Emacs Editor in Linux

$ sudo apt-get install emacs         [On Debian and its derivatives]
# yum install emacs                  [On RedHat based systems]
# dnf install emacs                  [On newer Fedora 22+ versions]

Note: In Linux Mint 17 I had to run the following command to complete the installation:

$ sudo apt-get install emacs23-nox


There are other command line editors, but they barely even reach the functionality that the above 3 provide. Whether you are a Linux newbie or a Linux guru, you will most definitely need to learn at least one of the above mentioned editors. If we’ve missed any command-line editor in this article, please don’t forget to inform us via comments.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Marin Todorov

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

19 Responses

  1. HugoLia says:

    Definitely: Vi/Vim.
    Available in all Linux distros, simple and powerfull.

  2. Alan says:

    You forgot my favorite shell editor, ne (nice editor). Why is it so nice? You can edit more than one file at a time and you can program it so that one key, say the F1 key, plays a number of keystrokes.

    This is helpful when changing format in a text file.

    • Ravi Saive says:


      Thanks for notifying about ne editor, to be fact never ever heard about this editor. Let me check about it and if its really that useful, will surely write a review on same..

  3. BPie says:

    now one can say vi/vim/nvim :)

  4. Aris Ripandi says:

    Still loving nano, but now i try to use micro

  5. Anders Jackson says:

    I like the concept of the editor wily though. Only works in Grafical mode, as it relies heavily on chords on the mouse. You must have a three button mouse…
    But otherwise I prefer Emacs, both in text and graphical mode. And the key bindings in Bash are the same as in Emacs.

  6. Irving says:

    I prefer Vi, but I’m biased given that I prefer it for all editing.

  7. iniabasi says:

    Very enlightening and educative article

  8. Jalal Hajigholamali says:

    vim is a lovely editor….
    if vim disappear from Linux, I will change my job

  9. Jalal Hajigholamali says:

    Thanks a lot…
    very useful article…

  10. MasCk says:

    definitely VI. Unlimited online resources and tutorials to boost productivity and customize it to your needs. I learn new tricks every single day. Thus I don’t want to give emacs a try…Good article tho

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.