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.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

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.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

6 Comments

Leave a Reply
  1. 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.

    Reply
  2. 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

    Reply
    • @Clemo

      Good to know, and about F1 not working as well as the “Pasted clipboard” at the bottom, sure these could be bugs, try to report these issues to the developers on the Micro Github repo

      Thanks for the feedback.

      Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.