I am looking for a Markdown viewer. It should:

  • run locally on Ubuntu - be a normal program, not a browser addon, webapp or anything else that requires usage of an internet browser*


  • simple and lightweight
  • open source

Viewer as in "view formatted content". It is fine if viewer is also an editor.

See https://stackoverflow.com/questions/9331281/how-can-i-test-what-my-readme-md-file-will-look-like-before-committing-to-github for wider version of this question.

*I give an exception to browsers running in terminal in text mode

  • I know you don't want anything which requires an internet browser. But may be you could check jupyter-lab. It has inbuilt markdown reader. VS code also has some extensions. Commented Oct 4, 2022 at 7:39

21 Answers 21


Though not strictly being a viewer, I can recommend ReText here – which I'm using myself on Ubuntu, and am pretty satisfied.

  • runs locally on Linux: Yes (also on Windows and Mac)
  • normal program, not a browser addon: Yes. Written in Python, and easy to deal with.
  • simple and lightweight: Yes. On its own, it comes with the basics – and you can add more (like support for specific Markdown dialects as Markdown Extra or MathJax if you need.
  • open source: Yes (using GPLv2)

ReText with Live Preview
ReText with Live Preview (source: ReText; click image for larger variant)

As I said to start with, it's not strictly a viewer – but an editor including a viewer and a "Live Preview". You can call it from the command line, passing the file as parameter. Unfortunately, there seems to be no way to start it directly in the viewer mode – but a work-around to at least have the "Live Preview" triggered:

  • start it once with a file open
  • press Ctrl-L (or use the menu: Edit › Live Preview) to switch on the "Live Preview" mode
  • using the menu, go to Edit › Preferences, and check "Restore live preview state" under "Behavior"

Now, when opened the next time, the "Live Preview" is switched on automatically. Alternatively, you can open the "real preview" (without the editor pane) by either clicking the "Preview" button, or using the keyboard-shortcut Ctrl-E.

For more details, also see my answers here and here.

  • You can even export to html pdf etc through Retext Commented Jun 13, 2015 at 9:53
  • 3
    On Ubuntu 16, a simple apt-get install retext will do the trick (then just invoke retext from the shell).
    – DavidJ
    Commented Nov 16, 2016 at 19:34
  • Same for Mint 18. But usually, the repos of distris often don't have the latest version (while currently the PPA still lacks the "xenial" branch ;)
    – Izzy
    Commented Nov 16, 2016 at 19:44
  • 1
    Installation: pip3 install retext --user. On Ubuntu 18.04, don't do the installation with apt-get; it doesn't work: I can open the file, but the preview does not show up. Instead, I get warnings due to missing python packages. This doesn't happen when installed via pip. Commented Jan 10, 2019 at 12:11
  • I tried enabling Github-style syntax highlighting in code-blocks, following this section of the wiki: github.com/retext-project/retext/wiki/…. Unfortunately I wasn't able to make it work. Commented Jun 14, 2019 at 11:21


I have been using this for a year and it is my goto Markdown render-er. Here are its features:

  • Markdown? Github Flavored
  • Linux? Yes
  • Normal? Yes
  • It is a command line tool
  • Offline? No
  • There's also a work-in-progress branch to provide offline rendering

  • Simple/Lightweight? Yes
  • It is a command line tool
  • Open source? Yes


  • Export to PDF/HTML
  • Host locally as a webpage/wiki
  • GitHub Auth to increase API limit (docs)

Here is an example of the HTML output.

enter image description here

  • 8
    I thought it works offline, because it starts a service on a local port, but this service inside connects remotely - I checked by taking the eth cable out ;) Commented Feb 7, 2017 at 10:46
  • 1
    A perfect example of "I can't believe this is not The answer"-syndrome that plagues SE sites. Commented Mar 31, 2018 at 9:58
  • 3
    grip requires use of a browser. So this is not the right answer.
    – GMaster
    Commented Jun 30, 2020 at 1:52
  • 1
    @ArnaudMeuret Feel free to open a separate question without "standalone program, not something that requires usage of an internet browser" requirement Commented Jul 20, 2021 at 6:05
  • 1
    Works great, but it stopped working after a while: it uses Github API and it has a limit of 60 requests/hour! This limit should only be applicable without logging in, but I'm not sure how I'm supposed to put my credentials for grip... Commented Nov 1, 2023 at 16:22



Okular has a Markdown backend, which allows it to display Markdown-formated text. On Debian-based systems (like Ubuntu) you might have to install the okular-extra-backends package to use it.

sudo apt install okular okular-extra-backends

The nice thing about Okular is that it is just a plain viewer. You can use your text editor of choice, and as soon as you save the Markdown document, Okular reloads the document.

  • 1
    At least for me Okular fails to line wrap, unlike other Markdown renderers. Commented Aug 30, 2020 at 6:13
  • @reducingactivity Did you report a bug? I'm running version 1.3.2 and it is wraps the lines just fine.
    – H. Rittich
    Commented Aug 31, 2020 at 8:27
  • I am running 1.9.3(okular -v). I have not reported bug because I already have a good tool for this task and I am not planning to use Okular for that. Also, they link to some unusuable monotracker at okular.kde.org/contact.php Commented Aug 31, 2020 at 13:39
  • @reducingactivity I just have tested the version in the current Ubuntu LTS, which is 1.9.3. For my test examples, Okular was wrapping the text as it should.
    – H. Rittich
    Commented Aug 31, 2020 at 14:16
  • The wrap issue that I experienced with version 1.3.3 (tied to Ubuntu 18.04) is when the text in the source file is indented by least two stops. This renders indented text, typeset as code, that is not wrapped; this may well be expected. If the indentation in the source file is removed, the text is typeset normally and gets wrapped as expected. The indentation in the source code may intrude because of a copy and paste, for example. Commented Jan 10, 2022 at 10:34
pandoc -s filename.md | lynx -stdin

This doesn't meet the requirement of "... or anything else that requires usage of browser", but the browser runs in a terminal in text mode.


  • 2
    I modified the question to allow in-terminal text mode browsers. Commented May 9, 2019 at 9:15

Following is copy of https://stackoverflow.com/questions/9331281/how-can-i-test-what-my-readme-md-file-will-look-like-before-committing-to-github#40696607 by Brian Burns

Atom works nicely out of the box - just open the Markdown file and hit Ctrl+Shift+M to toggle the Markdown preview panel next to it. It handles HTML and images also.

Atom screenshot

Though note that performance of Atom is ridiculously poor and that development of that software appears to be stopping - see https://github.com/atom/atom/graphs/contributors (probably as it makes no sense to Microsoft to maintain two text editors in the same niche)

As of March 2023 Atom is officially dead.

  • 2
    The only disadvantage is Atom can be heavy if you want to edit/view Markdown files only.
    – Jaime M.
    Commented Sep 13, 2018 at 7:22
  • 1
    I'll add that this plugin - atom.io/packages/markdown-preview-enhanced - is an excellent, full feature markdown addition that includes themes and link resolution, which the default markdown-preview doesn't currently support.
    – Stephan
    Commented Jul 2, 2020 at 15:49
  • Atom ????????? Doubt if it's still alive.
    – Trunk
    Commented Jan 26, 2021 at 16:51

What I generally do is run the markdown perl script and save the resulting html in a temporary file that can be browsed using Firefox. For example:

Markdown.pl index.md > index.html


I find Retext fine as is answered but I do have digged out a few MD editors for linux that are more or less better than the solution suggested.

If more they have additional features, and less so they are fast.

  • Haroopad This is more feature-filled than Remarkable, and looks like a dev tool.(The dev version of this app is also coming soon)

  • Springseed If you needed a note taker This one does the job Beautifully.

  • It would be better to post each tool in a separate answer so that each answer can be voted on separately
    – Flimm
    Commented Jan 26, 2023 at 9:10

There is also an amazing one here on GitHub appropriately named Glow... It's absolutely lightweight. You don't even need to leave the terminal. Works on Linux, Mac and Windows.

Here's a simple markdown text I created quickly to view with Glow. It only consists of an ordinary(non-marked-down) line of text, an H1 header, a horizontal rule, a block quote line, and a Python snippet:

I am not wrong!!!!!!!

# Can YOU handle it ????????


> Oh my goshhhhh!!!!!!

print("Hello World")

And here's a screenshot of the result:

enter image description here





In Ubuntu 20.04, install from the bundled apt repos:

sudo apt install ghostwriter


  • bundled in official Ubuntu repos
  • binary executable rather than a script


Image showing an example of a Ghostwriter rendering

  • Not good enough, I think. Strange that a decent MD file viewer for Ubuntu just can't be found . . .
    – Trunk
    Commented Jan 21, 2021 at 20:57


Brackets is an open-source free-of-cost text editor sponsored by Adobe. See Wikipedia.

enter image description here

Live preview of HTML+CSS is built-in.

Markdown Preview extension

➠ For live preview of Markdown, use the Markdown Preview extension by gruehle.

enter image description here



I found this one quite handy. It is a ruby gem, that allows CLI viewing of Markdown files.

if you are using Ubuntu:

sudo apt install ruby
sudo gem install mdless


  1. Simple Note:

    is a note taking and its accepting MarkDown


  1. Boostnote:

Another alternative and its what i am using.


Both are Totally Free..

  • SimpleNote won't open a MarkDown file if you double-click on it
    – Flimm
    Commented Jan 26, 2023 at 9:11

This question was asked in 2015. Meanwhile Visual Studio Code has become quite popular. It is available also on Linux.

VS Code has good Markdown support built-in, and since 2017 or so it has a Preview-Mode for Markdown (sync'ed split windows). For screenshots, scroll down on the page I've linked to.

Markdown support can also be enriched with many extensions, e.g. "markdownlint".

enter image description here

  • 1
    Would it be OK if I would add a screenshot? Commented Dec 15, 2018 at 6:40
  • yes, go ahead, good idea.
    – knb
    Commented Dec 15, 2018 at 10:19


Relevant Pros:

  • preview your document directly in the text editor rather than in a side pane (could be a cons but I find it a pro).
  • supports inline images
  • Write in markdown and export documents in HTML or in any other format supported by Pandoc (PDF, docx, ODT, etc.),
  • Preview text elements (such as headers, images, math, embedded videos, todo lists...) while you type,
  • Auto save your document on change (optional),
  • Display document table of content in an optional side pane,
  • Display syntax highlighting for code,
  • and many more


  • yet to find (maybe not so light?)
  • Nice editor but not "simple and lightweight".
    – xebeche
    Commented Jul 13, 2022 at 20:54
  • indeed, slightly on the heavy side (i find it simple to use though)
    – calocedrus
    Commented Jul 14, 2022 at 9:08

Ahh, It is very strange to me that Obsidian is not listed here. I have been using this tool for more than a year and I am quite happy with it.

I am using it without paying any subscription fees. I use git extension to save my notes to Github and I use termux in android to receive those updates.

However, you can use its premium service which has sync feature enable automatically for you.

enter image description here

enter image description here

enter image description here

  • After intensive searches on multiple occassions, I was unable to find anything decent which is open source. I have been using Obsidian on Pop!_OS for about 2 years now. For now it is okay for me. It is available on flathub as well on Obsidians's GitHub release page.
    – GMaster
    Commented Feb 10 at 20:39
has a nice interface
has a good interface
picky with the terminal size, but quick and effective
gave me a SEG FAULT


sudo apt search markdown
formiko/jammy,jammy 1.3.0-2 all — reStructuredText and MarkDown editor and live previewer
ghostwriter/jammy 2.1.1-1 amd64 — Distraction-free, themeable Markdown editor
lookatme/jammy,jammy 2.3.0-1 all — interactive command-line presentation tool
mdp/jammy 1.0.15-1 amd64 — command-line based Markdown presentation tool


Distro Available Command
Fedora 39 Yes dnf install apostrophe
Ubuntu 24.04 Yes apt install apostrophe
Pop!_OS 24.04 Yes apt install apostrophe
Debian 12 Yes apt install apostrophe
Kali Rolling Yes apt install apostrophe

(I started this as a comment to "izzy"'s answer but due to lack of formatting options I rewrote as an answer) - Thank you @izzy for mentioning this tool)

ReText works for me as follows:

  1. On the commandline enter retext --preview file.md

OR (to make thins easier)

  1. I did some changes in the Python sources of the installed package (don't do this without copying the original files - and know what you are doing ;-) )

This is for version 7.0.1-1, running on Linux Mint 19.3 - things have changed a bit in newer versions

  • in /usr/bin/retext (Python) search for the line containing

    previewMode = False and change it to previewMode = True

This starts ReText in preview-mode only and you can start viewing with retext file.md

  • in /usr/share/retext/ReText/window.py search for "view-refresh" and change the line after which is originally

    lambda: self.currentTab.readTextFromFile())


    lambda: self.currentTab.readTextFromFile(), shct=Qt.Key_F5)

    to refresh using F5-key

Of course this whole "hack" is not "end user friendly", not updateble and you have to do this as "root" - but anyway, for me(!) it works :-)


Markdown Viewer can be installed from Ubuntu Software.

The project site: https://github.com/mapitman/mdview

It is a command line tool that generates a temporary HTML file and open it in the browser.

  • See "not a browser addon, webapp or anything else that requires usage of browser" part of the question. Commented May 9, 2019 at 9:13

Microsoft VSCode

At the command line, for instance, just enter "code " and, once opened, just Ctrl+Shift+V.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.