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


17 Answers 17


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 Jun 13 '15 at 9:53
  • 1
    On Ubuntu 16, a simple apt-get install retext will do the trick (then just invoke retext from the shell).
    – DavidJ
    Nov 16 '16 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
    Nov 16 '16 at 19:44
  • 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. Jan 10 '19 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. Jun 14 '19 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
  • Simple/Lightweight? Yes
    • It is a command line tool
  • Open source? Yes


  • Export to PDF/HTML
  • Host locally as a webpage/wiki

Here is an example of the HTML output.

enter image description here

  • 4
    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 ;) Feb 7 '17 at 10:46
  • 1
    A perfect example of "I can't believe this is not The answer"-syndrome that plagues SE sites. Mar 31 '18 at 9:58
  • 2
    grip requires use of a browser. So this is not the right answer. Jun 30 '20 at 1:52
  • Installed but not visible/openable on Apps array. Started it on CLI but just got a load of excuses about "lazy loading" . . . Rubbish as usual with Ubuntu MD readers.
    – Trunk
    Jan 21 at 20:43
  • @ArnaudMeuret Feel free to open a separate question without "standalone program, not something that requires usage of an internet browser" requirement Jul 20 at 6:05

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)

  • 2
    The only disadvantage is Atom can be heavy if you want to edit/view Markdown files only.
    – Jaime M.
    Sep 13 '18 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
    Jul 2 '20 at 15:49
  • Atom ????????? Doubt if it's still alive.
    – Trunk
    Jan 26 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.

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.


  • 1
    I modified the question to allow in-terminal text mode browsers. May 9 '19 at 9:15

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.

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.

  • At least for me Okular fails to line wrap, unlike other Markdown renderers. Aug 30 '20 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
    Aug 31 '20 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 Aug 31 '20 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
    Aug 31 '20 at 14:16




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



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


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".

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


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..


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
    Jan 21 at 20:57

(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. May 9 '19 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, privacy policy and cookie policy

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