Read and Organize Markdown Files in Linux Terminal With Glow

Brief: Glow is a CLI tool that lets you render Markdown files in the Linux terminal. You can also organize Markdown files with it.

I love Markdown. I am not an expert Markdown user but I can surely write most of my articles in Markdown.

If you are a regular at It’s FOSS, you might have come across Markdown guides, editors and tools like Obsidian. I’ll add one more tool to this list. It’s called Glow and unlike previously covered applications, Glow enables you to read Markdown files in the terminal.

Wait! Can you not read Markdown in the terminal using the regular Linux commands to read text files like cat, less or even editors like Vim?

Yes, you can. But it will be the raw markdown file with all the codes displayed as it is, rather than showing a properly formatted text.

markdown display with catmarkdown display with glow
Glow renders the Markdown file

Do note that Glow is not an editor. You cannot use it to write in Markdown text.

Glow features Markdown lovers will love

Glow can be used in two formats: CLI and TUI.

Simply using Glow on a Markdown file will display the entire rendered content on the screen.

glow markdown_file
markdown display with glow
Markdown display with Glow

That’s good but Glow can do even better. It has additional options that open up the TUI mode (terminal user interface) and allows you to do more with it.

You can use the pager option to display the rendered text in pager mode (like how the less command shows the text without cluttering the screen).

glow -p markdown_file

In this pager view, you can use the / key and search for a certain text the same way you do with the less command. You can press q key to exit the view.

pager view with glow
Pager view similar to the less command

That’s not it. You can use the -a option and it will find all the Markdown files in the current directory and its subdirectories.

glow -a

You can use the arrow keys to scroll the files in the display. Up and down keys to move up and down, left and right arrow keys to move by pages.

glow collection
With -a option, Glow finds and displays all Markdown files in current directory

You can see the help options displayed at the bottom. The find option in this view allows you to search files by name (not their content).

find files in glow
You can search files by their name

There are also tabs. You can move between the tabs using the tab key, of course.

The stash tab works like a bookmark. You can create a stash/bookmark by pressing the s key while browsing files or while viewing their content. This bookmark will be visible only in the current directory.

You can press x key to remove bookmark (not file) or even add a memo by pressing the m key.

stash feature glow
You can bookmark files by stashing them with s key

The News tabs shows changelogs and other messages from the Glow developer(s).

glow news tab
The news tab shows messages from the developers

When you have found your desired file, you can view it by pressing enter. Since you are in the TUI mode, you get additional keyboard options here. The options can be displayed by pressing the ? key.

display help in file view in glow
You can view keyboard shortcuts by pressing the ? key

Installing Glow on Linux

Glow is available for Linux and macOS. You can install it using Homebrew on Linux and macOS, however, I would advise using the Linux packages here.

Glow is available in the repository of Void, Solus and Arch Linux. You can use their package managers to install it.

On Arch-based distributions, use:

sudo pacman -S glow

For Ubuntu, Debian, Fedora and SUSE, there are .DEB and .RPM binaries available for various architectures and you may find that on its release page.

Conclusion

Overall, Glow is a handy tool to beautifully view and organize Markdown files in the terminal. Like most other CLI tools, it is not for everyone. If you dwell in the terminal with a liking for Markdown files, you may give it a try. And when you do, please share your experience with it in the comment section.

Similar Posts

    • You go to the stash tab and then browse over the stashed file. You should see the option to delete at the bottom. It’s the X key. It says delete but it won’t delete the file itself. It just removes the file from stash (bookmark).