If you read documentation over SSH, or you simply live in a terminal, you do not need to leave it to read a .md file. A few small tools render headings, lists, code blocks and tables right where you are. Here is what each one does and how to run it.
Quick comparison
| Tool | Style | Best for |
|---|---|---|
| Glow | Rendered output, pager and a file browser | Everyday reading, nice themes |
| mdcat | Prints rendered Markdown, like cat | Scripts and quick looks; inline images in some terminals |
| Frogmouth | Full-screen reader with history and bookmarks | Browsing a set of docs |
| mdless | less-style reader | People who like less |
| Pandoc | Converter, not a viewer | Producing HTML, plain text or PDF |
Glow
Glow, from Charm, renders Markdown with colors and a style that matches your terminal.
glow README.md # render one file
glow # browse Markdown files in the current folder
glow -p README.md # open in a pager
glow -s dark README.md
It is available through Homebrew, winget, Scoop and many Linux package managers. If your distribution does not package it, follow the install instructions on the project page.
mdcat
mdcat behaves like cat for Markdown. It prints rendered text and, in terminals that support it (such as iTerm2, Kitty and WezTerm), can show images inline.
mdcat README.md
mdcat --paginate README.md
Frogmouth
Frogmouth is a Markdown browser for the terminal with navigation history, bookmarks and a table of contents. It is a Python application, so it installs well with pipx.
pipx install frogmouth
frogmouth README.md
mdless
mdless is a Ruby gem that renders Markdown and pages it like less.
gem install mdless
mdless README.md
Pandoc for conversion
Pandoc does not display Markdown itself, but it converts it:
pandoc README.md -t plain | less
pandoc README.md -o README.html
When a terminal is not enough
Wide tables wrap badly, and images only work in some terminals. For a document that depends on tables or pictures, copy the file to your desktop and open it in the online Markdown viewer. For desktop apps, see Markdown viewers for Linux, for Mac and for Windows.
Questions
How do I read a Markdown file on a remote server?
Install Glow or mdcat on the server, or copy the file to your own machine with scp and read it there.
Is there a viewer with syntax-highlighted code blocks?
Glow and mdcat both highlight fenced code blocks that name a language.
Preview Markdown in VS Code: Shortcuts and Extensions
Markdown Viewers for Linux: GUI and Terminal Options
Markdown Viewer Chrome Extension: Setup and Alternatives
How to Open and View .md Files on Any Device