Micro – A Modern Terminal Based Text Editor with Syntax Highlighting

Micro is a modern, easy-to-use and intuitive cross-platform terminal-based text editor that works on Linux, Windows and MacOS. It is written in GO programming language and designed to utilize the full capabilities of modern Linux terminals.

It is intended to replace the well known nano editor by being easy to install and use on the go. It has well aims to be pleasant to use around the clock (because you either prefer to work in the terminal, or you need to operate a remote machine over ssh).

Importantly, Micro requires no additional programs, it ships in as one single, ready-to-use, static binary (with every thing included); all you need to do is download and use it right away.

Features of Micro Terminal

  • Easy to install and use.It is highly customizable and supports a plugin system.
  • Supports common keybindings, colors and highlighting.
  • Supports automatic listing and error notifications.
  • Supports copy and paste with the system clipboard.
  • Offers several common editor features such as undo/redo, line numbers, Unicode support, softwrap.
  • Supports syntax highlighting for over 90 languages! And so much more..

How to Install Micro Text Editor in Linux

To install micro text editor, you can download a prebuilt binary for you system architecture and install.

There is also a automated script that will fetch and install latest prebuilt binary as shown.

$ mkdir -p  ~/bin
$ curl -sL https://gist.githubusercontent.com/zyedidia/d4acfcc6acf2d0d75e79004fa5feaf24/raw/a43e603e62205e1074775d756ef98c3fc77f6f8d/install_micro.sh | bash -s linux64 ~/bin

For a system-wide installation, use /usr/bin instead of ~/bin in the command above with sudo command (if your installing as non-root user).

$ sudo $ curl -sL https://gist.githubusercontent.com/zyedidia/d4acfcc6acf2d0d75e79004fa5feaf24/raw/a43e603e62205e1074775d756ef98c3fc77f6f8d/install_micro.sh | bash -s linux64 /usr/bin/

You will possibly get the “Permission denied” error, run the following command to move the micro binary to /usr/bin:

$ sudo mv micro-1.1.4/micro /usr/bin//micro

In case your operating system does not have a binary releases, but does run Go, you can build the package from source as shown.

Important: Ensure that you have installed Go (GoLang) 1.5 or higher (Go 1.4 will only work if your version supports CGO) on your Linux system in order to use Micro, otherwise click on the link below to follow the GoLang installation steps:

  1. Install GoLang (Go Programming Language) in Linux

After installing Go, type the following commands as a root user to install it:

# go get -d github.com/zyedidia/micro/...
# cd $GOPATH/src/github.com/zyedidia/micro
# make install

How to Use Micro Text Editor in Linux

If you’ve installed micro using prebuilt binary package or from automated script, you can simply type.

$ micro test.txt

If you installed from source, the binary will then be installed to $GOPATH/bin (or your $GOBIN), to run Micro, type:

$ $GOBIN/micro test.txt

Alternatively, include $GOBIN in your PATH to run it as any other system program.

Micro Text Editor

Micro Text Editor

To exit, press Esc key, and to save text before closing, press y(yes).

Save File in Micro Editor

Save File in Micro Editor

In the screen shot below, am testing the color and syntax highlighting features of Mirco, note that it automatically detects the syntax/file type (Shell and Go syntax in these examples below).

You can press F1 for any help.

Micro Syntax Highlighting

Micro Syntax Highlighting

You can view all Micro usage options as follows:

$ micro --help
$ $GOBIN/micro --help

For more about micro editor, go the project GitHub Repository: https://github.com/zyedidia/micro

In this brief article, we showed you how to install Micro text editor in Linux. How do you find Micro in comparison to Nano and Vi? Use the feedback form below to offer us your thoughts.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

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

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

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

You may also like...

6 Responses

  1. Frank says:

    I have used vi in the 80s then vim for years but last 10 years been using textmate (rmate) from ssh terminal.

    If you need a terminal editor without a massive learning curve Micro is brilliant.

  2. Clemo says:

    Thanks for this info. I successfully installed it in Centos 7.3. One thing I noticed is that F1 is not working. Its meant to provide Help Menu, but am getting funny characters, and at the bottom I notice a text “Pasted clipboard”. Not sure if its a bug

  3. Jalal says:

    Hi, Thanks for this article, but I prefer vim editor.

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.