Home Linux Commandline Tools Micro – A Command Line Based Text Editor for Linux

Micro – A Command Line Based Text Editor for Linux

Tired of using a Nano text editor? Then surely you have to try Micro – is a simple terminal-based text editor written in Go Language and released under MIT license.

[ You might also like: How to Create 100% CPU Load on Linux System ]

It will not be fair to say micro is a suitable replacement for VIM or Emacs since they offer much more features than what micro offers at the moment and I hope in future micro grows to the same comparable level.

Features of Micro Text Editor

  • Simple to install and use.
  • Supports syntax highlighting for 70+ languages.
  • Custom keybindings and Built-in keybindings similar to normal text editors.
  • Possible to install plugins.
  • Supports Horizontal and Vertical splits.
  • Supports color schemes.
  • Run terminal emulator inside micro.

How to Install Micro Text Editor in Linux

There are many ways you can install Micro in your Linux distribution. I will not show all the methods but only one method that will work across all the distributions.

There is an installation script that can take care of installing micro. Run the following command which will download the script and install the latest version of the micro text editor. Move the micro binary from your current directory from where you ran the curl command to the /usr/bin/ directory.

$ curl https://getmic.ro | bash
$ sudo mv micro /usr/bin/ 

How to Use Micro Text Editor in Linux

Simply type micro which will create an empty buffer. You can also open an existing file or create a new file you can do it in the following ways.

$ micro	                 # Creates an empty buffer
$ micro ~/.bashrc        # Opening an existing file
$ micro ~/newfile.txt    # Creates a file named newfile.txt 
Micro Empty Buffer
Micro Empty Buffer

Try to access help to get to know more about micro. To access help inside micro-press CTRL + G.

Micro Help Text
Micro Help Text

If you ever used nano text editor keybindings will be displayed at the bottom. Likewise, if you need keybindings to be displayed press ALT + G.

Micro Keybindings
Micro Keybindings

Micro Built-in Command Bar

Micro has a built-in command bar from which you will modify parameters, open new files, perform splits, and many more. To open the command bar press CTRL + E. This is well documented in the help section.

Micro Built-in Command Bar
Micro Built-in Command Bar

Micro Keybindings

Creator of micro tried using the same set of common keys we use in popular text editors. To get the list of default keybindings open the command bar (CTRL+E) and type the following command.

> help defaultkeys
Micro Default Keys
Micro Default Keys

You can also create custom keybindings in bindings.json file stored under your home directory ~/.config/micro/bindings.json.

Micro Color Scheme

Micro has a set of built-in light and dark themes. To set a theme press CTRL+E and type the following command. You can press the tab after typing set which will popup options for you.

> set colorscheme <themename>
Micro Themes
Micro Themes

Micro Horizontal and Vertical Splits

Micro supports horizontal and vertical split. To open a file in either horizontal or vertical split, press CTRL+E and type the following command.

> hsplit filename    # Horizontal split
> vsplit filename    # Vertical split

You can press CTRL + W to move between splits.

Micro Horizontal and Vertical Splits
Micro Horizontal and Vertical Splits

That’s it for this article. In this article, we tried to show you some of the important features of a micro text editor. Give micro a try and share your feedback with us.

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

2 thoughts on “Micro – A Command Line Based Text Editor for Linux”

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.