How to Read Markdown Documents in Your Linux Terminal With Glow

Markdown is great for writing and allows you to format a document in any text editor, using rich features including heading, code extracts, bold, italics, checklists, bullet points, tables, and more. But while Markdown is easy to write in an editor such as nano, it isn’t so easy to read in the terminal.

Glow is a command-line utility that displays Markdown documents the way they’re meant to be read.

What Is Markdown, and Why Is It Hard to Display in a Terminal?

Markdown is a convention for formatting text, and it’s pretty much the opposite of a What You See Is What You Get (WYSIWYG) type editor.

Markdown documents contain a variety of symbols that show how the text is supposed to be formatted on a page. These symbols are interpreted by a Markdown parser, and either displayed in a document reader or converted to HTML to be displayed on the web.

It’s because Markdown relies on the symbols being interpreted by an external app that you can create it in even the simplest text editor. You don’t need a multi-gigabyte MS Office download to create a Markdown document; you can do it in nano, vim, or Emacs.

Displaying Markdown documents is a different matter. Sure, you can open them in nano again, or you can use cat to view the contents of the file, but you won’t see the Markdown rendered as it should be for readers; you’ll see the formatting symbols instead.

For users who spend a lot of time cloning Git repositories, this quickly becomes a chore. Git README files are typically Markdown documents, and splitting your attention between mentally rendering a Markdown doc and digesting its content means you can miss a lot.

While you could use a dedicated GUI Markdown renderer, or check out the website, this means you would have to defocus and leave your terminal. If you’re using a VPS or have an aversion to GUIs of any sort, you’d be out of luck.

Glow is a terminal-based Markdown reader which is perfect for reading Markdown documentation directly on the command line. You can use it to discover Markdown files and stash them in your private collection.

How to Install Glow on Linux

Although Glow isn’t available in most Linux distributions’ official repositories, it’s still easy to install it.

On Debian and Its Derivatives

To install Glow on Ubuntu- and Debian-based distributions, first, you’d need to add the Glow GPG key and then add its repository to your system’s sources list.

Add the key to your keyring and the repository to your sources using:

sudo mkdir -p /etc/apt/keyrings
curl -fsSL https:
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https:

Update your system’s package list, then install Glow with:

sudo apt update
sudo apt install glow

Install Glow on Fedora

To download and install Glow on Fedora, RHEL, and other RPM-based distros, run the following command first:

echo '[charm]

Then, install Glow by typing:

sudo yum install glow

On Arch Linux and Its Derivatives

You can install Glow on Arch-based distributions using the default package manager, Pacman.

sudo pacman -S glow

Install Glow as a Snap

If you’re lucky enough to have a system supported by Canonical’s proprietary Snap Store, you can install Glow with:

sudo snap install glow

For those who don’t have Snap installed or don’t know how it works, check out our detailed guide on installing and using Snap Store on Linux.

Using Glow to Read Markdown Documents in Your Terminal

The most straightforward way to use Glow is to pass it a Markdown file as an argument:


markdown document rendered in the terminal using glow

As you can see, Glow rendered an otherwise difficult document, complete with bold and italics, quoted text, tables, lists, and links with anchor text.

That’s pretty neat, and Glow also comes with a terminal user interface. You can activate it with:


…and Glow will present you with a recursive list of local Markdown files. You can navigate the list with your keyboard arrow keys, and hit Return to select one. Hitting Esc will return you to the main menu.

You can launch Glow in any directory by adding the directory path as an argument:

glow ~/my/markdown/file/dump/

Glow makes it easy for you to stash Markdown files for quick reference later. Simply open any Markdown document with the Glow TUI, and hit S on your keyboard.

Alternatively, if you don’t fancy opening the full TUI to stash a Markdown document that’s right in front of you, run:

glow stash

You can find your stashed articles from the main TUI, by using the Tab key to navigate to the “stash” tab.

Use Glow to Read Markdown Documents Online

Glow works perfectly with GitHub README files, and if you know the name of the repository you want, then:


…will result in the Glow README being fetched from GitHub and rendered as standard output.

If your Markdown file is elsewhere, you can use:

glow https:

Customize Glow to Display Markdown in the Terminal

Glow works well as is, and will attempt to detect your terminal color scheme before presenting you with formatted Markdown. You can change the defaults if you wish and can choose from a light or dark theme with the style switch -s.

glow -s light

Or switch to the dark mode with:

glow -s dark

If you have a custom stylesheet, you can easily use it with Glow, too:

glow -s mystyle.json

Glow Makes It Easy to Render Markdown Documents

Reading Markdown documents in your terminal is a huge quality of life improvement, and means that you don’t need to spend system resources opening yet another GUI-driven app or browser.

If you fancy taking a break from reading lengthy Markdown documents, you can search for YouTube videos from your terminal, too!

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *