Linux console text editor

Best Linux Command Line Text Editors

Text editors are useful tools for any operating system to work with this. While working with the GUI-based operating system, you can find lots of text editors.

The Linux users and system administrators always prefer to use command line interface to work on it. In this guide, you will find some details of the most favorite and useful command line text editors.

Note: Fedora 22+ Users use DNF to install packages instead of yum.

#1. vi/vim – Text Editor

Vi (visual editor) or Vim is most commonley used text editor for the command line users. The minimum operating system installation may not have default installed it. Use the following command to install.

$ sudo apt install vim #For Debian based systems $ sudo yum install vim #For Redhat based systems $ sudo dnf install vim #For Fedora 22+ systems 

#2. Nano

Nano is another favorite and commonley used text editors by the command line users. This also default installed on most of the Linux platforms. You can also use following command to install nano on your Linux system.

$ sudo apt install nano #For Debian based systems $ sudo yum install nano #For Redhat based systems $ sudo dnf install nano #For Fedora 22+ systems 

#3.Nice Editor (ne)

Nice (ne) editor is intended to provide an alternative to vi that will be more familiar to beginners. The ne text editor supports most of the common features in advanced text editors, such as syntax highlighting, regular expressions, key bindings, and auto-completes etc. Use the following command to install this on your system.

$ sudo apt install ne #For Debian based systems $ sudo yum install ne #For Redhat based systems $ sudo dnf install ne #For Fedora 22+ systems 

#4. EMACS

Emacs is an extensible, customizable and real time display editor. This is a GNU project application for command line lovers. Install Emacs on your system using the following commands.

$ sudo apt install emacs #For Debian based systems $ sudo yum install emacs #For Redhat based systems $ sudo dnf install emacs #For Fedora 22+ systems 

#5. mc (Midnight Commander)

Midnight Commander provides an internal text editor, which can be invoked with mc -e or mcedit commands, featuring syntax highlighting, regexp searching and other features.

$ sudo apt install mc #For Debian based systems $ sudo yum install mc #For Redhat based systems $ sudo dnf install mc #For Fedora 22+ systems 

Источник

9 Best Text Editors for the Linux Command Line

Looking to edit files in the command line? These are the best editors for Linux terminal when you go all command line.

Читайте также:  Информация о терминале линукс

A text editor is a must-have application for any operating system. We have no dearth of good text editors on Linux. There is Gedit for quick text note down, there is VS Code for writing codes and more. But those are all GUI-based editors. What if you need to edit files in the terminal? Linux sysadmins need to do that on a daily basis. The average desktop Linux user may also need to edit files in the command line from time to time. Your distribution has a terminal-based text editor installed by default. But don’t restrict yourself to just that. Here, I have compiled a list of the best command line text editors for Linux. Feel free to experiment. Please note that this is not a ranking list.

1. Neovim

neovim text editor

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 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):

2. ne – The Nice Editor

ne the nice editor

When compared to the classic and popular text editors, ne (the nice editor) is a good alternative that tries to offer advanced functionalities and make 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. I tried it installing on Ubuntu 22.04 and it worked just fine. You can explore more about it on 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:

You can also check out their official download page for more information on other Linux distributions.

3. Vim

vim text editor

If you’ve been on Linux for quite some time, you must have heard about Vim. Vim is an extensively configurable, cross-platform, and 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 must be determined to climb 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.

Читайте также:  Oracle database autostart on linux

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:

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.

4. GNU Emacs

gnu emacs text editor

GNU Emacs is undoubtedly one of the oldest and versatile text editors 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 type of text file. 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 use 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:

You can find more information on it on 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:

Basically, this command instructs not to include any window to launch the program but the terminal itself.

5. MCEDIT

mcedit text editor

Midnight Commander is a fairly popular command line file manager and mcedit is an internal file editor of GNU Midnight Commander. It’s possible that many of us forget about this text editor, which is embedded inside the midnight commander utility. What this editor does, is open the files specified on the command line. The editor is based on the terminal version of cooledit – a standalone editor for X Window System.

How to install it?

6. Nano

nano text editor

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.

7. Tilde

tilde text editor

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.

Читайте также:  Linux red hat firewall

How to install it?

For information on other Linux distributions, you may refer to their GitHub page or the download page to explore more about it.

8. Micro

micro text editor

Micro is an easy-to-use and highly customizable text editor. It also implements the universal copy/paste/save shortcuts (CTRL + C/V/S), which is rare in Linux terminal editors. Another cool offering from this text editor is its plugin system and internal command mode. Though it’s not feature-rich like Vim or other mature text editors, it can easily replace tools like Nano for occasional file editing in the terminal.

How to install it?

Micro is available in the repositories of all major distributions. In Ubuntu, you can install it with:

For other Linux systems, you can check out their GitHub page. We have an article on Micro text editor with a free cheat sheet for beginners if you are interested.

9. Helix

helix editor

Helix editor is a rust-based terminal text editor, which is both fast and efficient in resources. It uses Tree-Sitter for syntax highlighting, which helps boost the speed. The built-in language server support provides context-aware completion, diagnostics, and code actions. Helix editor offers several powerful tools, that can make it work like other editors like Vim and Emacs. On their website, they call themselves, a post-modern text editor, if Neovim is the modern Vim, then Helix is post-modern. For those who are interested, you can check out a dedicated Helix article

How to install it?

For Arch and its derivatives, there is a package available in the Community repository. Also, an AUR package is also available, which builds the master branch. For other Linux distributions, you have to use Cargo, the Rust Package Manager. You should be able to install Cargo using your distribution package manager Also, you need to make sure that Git is installed. On Ubuntu-based distributions, install both like this:

sudo apt install git cargo
git clone https://github.com/helix-editor/helix cd helix cargo install --path helix-term

Helix also needs its runtime files so make sure to copy/symlink the runtime/ directory into the config directory. This location can be overridden via the HELIX_RUNTIME environment variable.

ln -s $PWD/runtime ~/.config/helix/runtime
export PATH=$PATH:/home/team/.cargo/bin

Wrapping Up

If you are an experienced Linux user, you must have heard of most of the options mentioned in this list, if not all. For most users, going with Nano, Vim or Emacs should be good enough. The seasoned terminal dwellers could experiment with the likes of Micro, Helix or some other terminal text editors. That’s just my recommendation. And I would like to know yours. Which text editor do you prefer in the command line? Did you find a new, interesting one on this list? Share it in the comments.

DuckDuckGo hidden features

Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine

What is TTY in Linux

What is TTY in Linux?

s-tui is used for CPU utilization monitoring

Beautifully Monitor CPU Utilization in Linux Terminal With Stress Terminal UI

Access Grub in VM

How to Access the GRUB Menu in Virtual Machine

FOSS Weekly 23.28

FOSS Weekly #23.28: China’s Linux OS, Linux Exit Codes, Btrfs Origins and More

cp command in Linux

Using cp Command in Linux

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

Источник

Оцените статью
Adblock
detector