Every Linux server you log into needs a terminal text editor, and picking the wrong one means fighting the keyboard instead of fixing the config. Here’s how Vim, Neovim, nano, Micro, Helix, Microsoft Edit, and Emacs compare, and how to install each one.
It also supports the mouse for selecting text, has syntax highlighting for many languages, split panes, and a plugin system. Press Ctrl+E to open its command bar, where you can type commands such as set colorscheme simple to change settings.
If you’re new to Linux and want to build confidence with editors, the shell, and everyday administration tasks, our Learn Linux in 7 Days course is a good next step, since it walks through working on a real Linux system from the first login.
Two practical questions also matter on servers. The first is whether the editor is already installed, because on a locked-down production machine you may not be allowed to install anything new, which usually leaves you with vi or nano.
sudo apt install nano
The second is whether you need programming features such as code completion and error checking, in which case Neovim or Helix, with their built-in LSP support, are the better fit.
Want to go deeper? Vim is just one of the commands you use every day on a server, and our 100+ Essential Linux Commands course covers the rest with practical examples you can run straight away.
2. Nano Editor
On Ubuntu and Debian, install the full vim package with apt:
echo ‘export EDITOR=nvim VISUAL=nvim’ >> ~/.bashrc
source ~/.bashrc
nano, Micro, and Microsoft Edit are modeless editors, so whatever you type goes straight into the file and commands use key combinations such as Ctrl+S, which makes them a good choice for beginners and for quick changes to a single config file.
On servers, install the terminal-only build called emacs-nox, because the default emacs package pulls in graphical libraries that a headless server doesn’t need.
Users run email, file management, Git workflows through Magit, and note-taking with Org mode, all inside Emacs.
Vim is extremely flexible once you learn its commands. You can move between words, lines, and paragraphs with single keys, record macros to repeat an edit across many lines, and use regular expressions to replace text across a whole file.
If nano finally ended the “how do I quit vi” panic for you, share it with someone who still edits server files by downloading them to their laptop first.
3. Neovim
On a Linux desktop, Micro’s copy and paste talks to the system clipboard through xclip or xsel on X11, or wl-clipboard on Wayland. If copying from Micro doesn’t reach other applications, installing one of these tools usually fixes it.
A terminal editor is one of the few tools you’ll use on every Linux server, so it’s worth choosing one deliberately. nano, Micro, and Microsoft Edit get you editing immediately, Vim works almost everywhere, Neovim and Helix bring modern coding features to the terminal, and Emacs can grow into a complete working environment.
Most servers don’t have a desktop at all, so when you connect over SSH, the terminal editor is the only way to change those files.
It also runs on Linux, which makes it useful for people who move between Windows and Linux servers.
sudo apt update
sudo apt install neovim
sudo apt install hx
Editing files from the command line is something every Linux administrator does daily, whether it’s an SSH configuration, an Nginx virtual host, a cron job, or a systemd unit override.
4. Micro Editor
If the sudoedit tip changed how you edit root-owned files, share it with a colleague who still runs their entire plugin setup with sudo vim.
sudoedit /etc/ssh/sshd_config
sudo apt update
sudo apt install emacs-nox
Edit has a menu bar that you open with the Alt key, full mouse support, and VS Code style shortcuts, so Ctrl+S saves, Ctrl+Q quits, and Ctrl+F finds text. It focuses on simple editing rather than programming features, so think of it as an alternative to nano rather than to Neovim.
sudo add-apt-repository ppa:maveonair/helix-editor
sudo apt update
sudo apt install helix
curl https://getmic.ro | bash
sudo mv micro /usr/local/bin/
sudo dnf install nano
sudo dnf install emacs-nox
Everything you type goes straight into the file, and the most common shortcuts are listed along the bottom of the screen, so you never have to remember them.
emacs -nw filename
The main difference from Vim is the order of commands. In Vim, you type the action first and then the movement, so dw means “delete a word“.
In this guide, we’ll cover seven command-line editors that Linux users rely on today, from long-standing classics to newer options built for modern workflows. For each one, we’ll look at what it’s good at, how to install it on Ubuntu and Rocky Linux, and the few keys you need to open, save, and quit a file.
We’ll start with Vim (Vi IMproved), because it’s the editor you’re most likely to find on a server you didn’t set up yourself. Almost every Linux distribution ships at least a minimal vi, and on Rocky Linux and RHEL minimal installs, vi comes from the vim-minimal package, so it’s there even when nothing else is.
It’s worth knowing the basics of several editors, because you never know what will be installed on the next server you log into. At the same time, it pays to choose one editor and learn it properly, since the time you save on small edits adds up quickly over months of server work.
Emacs uses Ctrl and Alt (called Meta in Emacs) key sequences. Save a file with Ctrl+X followed by Ctrl+S, and quit with Ctrl+X followed by Ctrl+C. If you prefer Vim’s keys, the Evil package adds a Vim-style modal mode on top of Emacs.
Vim is a modal editor, which means the keyboard behaves differently depending on the mode you’re in. In normal mode, keys move the cursor and run commands, and you only type text after switching to insert mode.
If Helix finally gave you code completion without spending an evening on plugin configs, share it with a teammate who is still copying .vimrc files between servers.
6. Microsoft Edit
One feature that’s especially useful for sysadmins is TRAMP, which lets Emacs on your workstation edit files on a remote server over SSH, so you keep your own configuration without installing anything on the server. Press Ctrl+X Ctrl+F and open a path such as /ssh:[email protected]:/etc/hosts.
On Debian 13 and newer, Helix is packaged under the name of its command:
Helix reverses this, so you select first and then act: pressing w highlights the next word, and d deletes it. Because you always see the selection before anything changes, many users find mistakes easier to avoid.
You might also like:
nano uses the ^ symbol to mean the Ctrl key, so ^O means Ctrl+O. Save the file with Ctrl+O, exit with Ctrl+X, search with Ctrl+W, and undo with Alt+U. A handy option when you’re following an error message that names a line number is to open the file directly at that line:
sudo dnf install msedit
Helix includes support for the language servers, but it doesn’t install them for you. Run the following command to see which languages have a working language server on your system:
Vim, Neovim, and Helix are modal editors, so they ask you to learn normal and insert mode first, but they repay that effort with very fast editing once the keys become habit.
Helix is aimed at people who write code, while Microsoft Edit is aimed at the opposite end: users who are new to the terminal. Microsoft released it as open source in 2025, written in Rust, as a modern take on the classic MS-DOS Editor, mainly to give 64-bit Windows a built-in command-line editor.
hx –health
This is why Neovim has become the base for popular ready-made setups such as LazyVim, which turn it into a full development environment.
Because the plain name edit clashes with existing commands on some systems, Linux packages usually install it as msedit. On Fedora, it’s available from the default repositories, and on Rocky Linux, AlmaLinux, and RHEL, it comes from EPEL once the CRB repository and epel-release are set up as shown in the Neovim section.
For example, the following command, typed in normal mode, changes every occurrence of port 8080 to 8081 in the open file:
sudo apt update
sudo apt install micro
This takes some practice, but once it clicks, you can edit files very quickly without reaching for the mouse or arrow keys.
On Ubuntu and Debian, Neovim is available from the default repositories:
How to Choose a Command-Line Text Editor in Linux
nano +42 /etc/nginx/nginx.conf
Emacs sits apart from both groups, because it’s modeless by default but is extended so heavily that many users treat it as a complete working environment rather than an editor.
If Vim feels like too much for a five-second change, GNU nano is the editor most people reach for next, because it’s simple and comes preinstalled on most of the Linux distributions.
sudoedit copies the file to a temporary location, opens it in your editor as your normal user, and only writes it back with root permissions after you save:
We’d love to hear which editor you use on your own servers. Do you stick with Vim everywhere, or have you moved to Neovim or Helix?
:%s/8080/8081/g
Emacs has the steepest learning curve on this list, but it also comes with a built-in tutorial. Press Ctrl+H followed by t to start it.
| Editor |
Command |
Style |
Installed by Default |
Best For |
| Vim |
vim / vi |
Modal |
vi on most servers |
Editing on any server |
| GNU nano |
nano |
Modeless |
Ubuntu, Debian |
Quick config changes |
| Neovim |
nvim |
Modal |
No |
Vim users who want LSP and Lua plugins |
| Micro |
micro |
Modeless |
No |
Beginners who want modern shortcuts |
| Helix |
hx |
Modal |
No |
Coding with LSP and no plugin setup |
| Microsoft Edit |
msedit / edit |
Modeless |
No |
Users coming from Windows |
| GNU Emacs |
emacs -nw |
Modeless (extensible) |
No |
A complete, customisable environment |
Tips for Using Command-Line Editors on Linux Servers
Once you’re comfortable with Vim, you may start wanting features from modern code editors, such as completion, error checking, and smarter syntax highlighting. Neovim is a fork of Vim that adds these while keeping the same keys, so everything you learned in the Vim section still works.
The biggest difference is under the hood. Neovim includes a built-in client for the Language Server Protocol (LSP), a standard way for editors to talk to language-specific tools that provide code completion and error checking, uses Tree-sitter (a parsing library that understands code structure) for more accurate highlighting, and is configured in Lua through the ~/.config/nvim/init.lua file instead of Vimscript.
Is there a command-line editor we should add to this list? Feel free to share your favourite editor settings or any problems you’ve run into in the comments below.
On Ubuntu and Debian, Micro is in the default repositories:
Micro uses the same shortcuts as most desktop applications, so Ctrl+S saves, Ctrl+Q quits, Ctrl+Z undoes, Ctrl+C and Ctrl+V copy and paste, and Ctrl+F searches.
Press the space bar in normal mode to open a menu that lists the most useful commands, and use :w and :q to save and quit, as in Vim.
sudo update-alternatives –config editor
sudo dnf install vim-enhanced
Neovim rewards the time you put into learning it, but not everyone wants a modal editor. Micro takes the opposite approach to Vim and Neovim, and aims to be the editor that feels natural on the first day while still being comfortable for full-time use.
The following table brings the seven editors together so you can compare them at a glance:
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
sudo ln -s /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/nvim
Start Neovim with nvim filename. After installing plugins or language servers, run :checkhealth inside Neovim, which reports anything missing, such as a clipboard tool or a language server that isn’t in your PATH.