Skip to content

Installing Micro

Zachary Yedidia edited this page Jun 2, 2020 · 14 revisions

The readme provides quick instructions for installing micro either by downloading the binaries (if you don't have Go installed on your system), or by using go get to build micro from source.

This page will contain some explanation for installation with package managers, and also how the makefile that comes with micro works.

Installation script

There is a great script which can install micro for you by downloading the latest prebuilt binary. You can find it at https://getmic.ro (the github repo for it is here).

Then you can easily install micro:

$ curl https://getmic.ro | bash

The script will install the micro binary to the current directory.

See the Github page for more information.

Package Managers

Homebrew

If you are on OSX, you can install micro using Homebrew:

brew install micro

Arch Linux

If you are on Arch Linux, you can install micro using the AUR:

git clone https://aur.archlinux.org/micro.git
cd micro
makepkg -si

or using yay:

yay -S micro

CRUX

If you are on CRUX, you can install micro using the 6c37-git repo:

git clone https://github.com/6c37/crux-ports-git
cd crux-ports-git/micro
# make sure you have go installed!
pkgmk -i

Termux for Android 5+

  • Install open-source terminal environment Termux (https://termux.com)
  • Install micro using Termux's Apt package manager:
apt update
apt install micro

pkgsrc

On NetBSD or any other pkgsrc-supported platform like Illumos, Linux, or macOS micro can be installed from source:

$ cd /usr/pkgsrc/editors/micro
$ bmake install

Or binary package, if available:

$ pkg_add micro

Makefile

The Makefile (which can be viewed here) tries to be as simple as possible.

Here is an overview of the Makefile and what each command does:

make update updates micro's source code and all of the dependencies.

make runtime downloads and installs github.com/jteeuwen/go-bindata/ and then uses that to create the runtime.go file from the runtime/ directory. This file is used so that the runtime/ directory (containing micro's default runtime files such as colorschemes and plugins) is embedded inside the micro binary.

make build runs make deps and make tcell and then builds micro and links in the correct version (the current commit hash) and places the binary in the current directory.

make install runs make build and then places the binary in $GOPATH/bin.

Clone this wiki locally