Editing configuration files, scripts, and source code directly in the Linux terminal often forces users into an uncomfortable dichotomy. You either rely on nano, which lacks robust syntax highlighting, multi-cursor support, and split-pane capabilities, or you confront the steep learning curve and modal keystrokes of vi and vim. For developers and system administrators seeking an intuitive, full-featured terminal editor that behaves like a modern GUI code editor, micro is the ideal solution. Built with full mouse support, familiar cross-platform keyboard shortcuts (such as Ctrl+C, Ctrl+V, and Ctrl+S), and an extensive plugin ecosystem, micro delivers immediate terminal productivity with zero barrier to entry.
What Is the Micro Text Editor and Why Use It?
micro is an open-source terminal-based text editor written in Go. Its core philosophy is to leverage the full terminal capabilities of modern emulators while retaining standard desktop conventions.
Key features that distinguish micro from other terminal editors include:
- Universal Desktop Shortcuts: Save with
Ctrl+S, copy withCtrl+C, cut withCtrl+X, paste withCtrl+V, undo withCtrl+Z, and quit withCtrl+Qout of the box. - Native Mouse Integration: Click to position the cursor, drag to highlight text, scroll with the mouse wheel, and double-click to select words seamlessly inside the terminal window.
- Split-Pane Views: Divide your terminal workspace vertically or horizontally to compare or edit multiple documents concurrently.
- Multi-Cursor Editing: Spawn multiple editing cursors simultaneously (similar to Sublime Text or VS Code) for rapid mass refactoring.
- Syntax Highlighting for 130+ Languages: Automatic language detection and colourised themes without manual grammar configuration.
- Built-in Plugin System: Extend functionality with Lua plugins, including linter integrations, Git status gutters, and auto-closing brackets.
Installing Micro on Linux
micro can be installed across all major Linux distributions via native package managers, the official installer script, or pre-compiled binaries.
Method 1: Installing via Official Shell Script (Universal & Recommended)
The micro development team maintains an official automated installation script that detects your system architecture and places the static binary in your current directory:
cd /tmp
curl -sL https://getmic.ro | bash
sudo mv micro /usr/local/bin/
Method 2: Installing via APT (Debian and Ubuntu)
sudo apt update
sudo apt install micro -y
Method 3: Installing via DNF or Pacman (Fedora and Arch Linux)
# Fedora / RHEL
sudo dnf install micro -y
# Arch Linux
sudo pacman -S micro
Confirm the installation by checking the installed version:
micro --version
Basic Editing and Core Commands
To open an existing file or create a new document, invoke micro followed by the filename:
micro server_config.yaml
Once inside the editor, you can immediately begin typing. The key combinations match standard desktop expectations:
Ctrl+S: Save the active file.Ctrl+Q: Quit the editor. If you have unsaved changes, micro prompts you to confirm.Ctrl+F: Search for text within the active document. PressEnterto cycle through matches.Ctrl+E: Open the micro command bar (prompt) at the bottom of the screen.
Advanced Features: Splits, Multi-Cursor, and Plugins
Working with Split Panes
To view two files side-by-side or horizontally stack multiple views:
- Press
Ctrl+Eto activate the micro command prompt. - Type
vsplit filename.txtto create a vertical split pane. - Alternatively, type
hsplit filename.txtfor a horizontal split. - Switch between panes by clicking them with your mouse or pressing
Ctrl+Wfollowed by arrow keys.
Using Multi-Cursor Editing
Hold Alt and click with your mouse at multiple points across your text to instantiate multiple active cursors. Anything you type or delete executes across all cursor positions simultaneously. Press Esc to clear secondary cursors.
Managing Plugins
micro includes an internal plugin manager accessible directly from the editor command prompt (Ctrl+E):
# Inside micro command prompt (Ctrl+E):
plugin list
plugin install wc
plugin install snippets
Setting Micro as Your Default System Editor
To ensure system utilities like git commit, crontab -e, and visudo launch micro instead of nano or vi, update your environment variables:
echo 'export EDITOR="micro"' >> ~/.bashrc
echo 'export VISUAL="micro"' >> ~/.bashrc
source ~/.bashrc
On Debian and Ubuntu systems, update the alternative links:
sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/micro 50
sudo update-alternatives --set editor /usr/local/bin/micro
Adopting the micro text editor on Linux eliminates terminal editing friction, combining desktop familiarity with command-line speed.