Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I found a file formatted with Markdown. Could you guys suggest what viewer that I could use to view this type of files? Hopefully one without gui (if it's possible)

Update I was actually looking for a viewer that could parse markdown file format that does not need any conversion. But something close to that should be ok.

share|improve this question
A markdown file can just be read when you open it in an editor, you don't really need fancy tools to read it. What do you want it for/what format do you want it to be in? –  kasterma Nov 17 '10 at 20:29
I think what I want is some sort of browser addon that lets me open markdown files just like it was an html file. Does that exist? –  PapaFreud Nov 29 '12 at 9:58
I really hate how people now write their README files in "markdown". Sure, it's "human-readable" (but then so is XML isn't it!?), but only to a point. Most of it is so hideous that it just hurts my eyes to look at. What would be nice is a man-like viewer for it so that you could easily read it from the command line without having to process it and open the result with a fucking Web browser. –  bambams Feb 9 at 5:41

10 Answers 10

up vote 16 down vote accepted

The following website provides a tool that will translate markdown into HTML:


Once you convert the file to HTML, there are a number of command line tools to use to view the file. Using a test file that contains markdown formatted-text, I found the following worked nicely.

$ wget http://daringfireball.net/projects/downloads/Markdown_1.0.1.zip
$ unzip Markdown_1.0.1.zip
$ cd Markdown_1.0.1/
$ ./Markdown.pl ~/testfile.markdown | html2text

html2text is one of many tools you can use to view html formatted text from the command line. Another option, if you want slightly nicer output would be to use lynx:

$ ./Markdown.pl ~/testfile.markdown | lynx -stdin

If you are an emacs user, someone has written a mode for markdown which is available here: http://jblevins.org/projects/markdown-mode/. This provides nice syntax highlighting as can be seen in the screenshot on that website.

All of these tools should be available for slackware.

share|improve this answer
In VIM you can get syntax highlight by manually setting the syntax to markdown if it isn't recognized. :set syntax=mkd –  Gert Nov 17 '10 at 9:48
I never would have thought to use -stdin and lynx, very clever indeed and just what I needed. –  NickO Jan 7 '14 at 19:39

Using pandoc and lynx without creating temporary files:

pandoc file.md | lynx -stdin
share|improve this answer

There's also Discount, David Parsons' C implementation of John Gruber's Markdown text to html language. Discount consists of several command-line tools including markdown, mkd2html, makepage, mktags and theme.


In addition, there's an implementation of markdown in C, using a PEG grammar.


On Mac OS X you also may have a look at qlmarkdown, a QuickLook generator for Markdown files.

share|improve this answer

Is a GUI program, but I find useful for this task ReText, that is an editor for Markdown and reStructuredText with a preview mode:

ReText screenshot

However, if you need see the file of ReText from a terminal, one option could be convert the marddown to html with pandoc and see the html copy in lynx:

pandoc file.mkd > file.html ; lynx file.html
share|improve this answer
I use retext exclusively. It hasn't failed me yet but then I haven't used it as extensively as some others have. I use it exclusively to make issues in github (which sadly uses markdown) and has no GUI for it. –  shirish Dec 2 '14 at 20:18

I know you said you preferred a non-GUI application, but I am currently working on a GUI application called DownMarker which does this. You can find the source in a mercurial repository here. You can find a stand-alone executable to run with mono or .NET here.

Caveat: It is far from finished and only occasionally tested on linux/mono. Last test I did was on Mono 2.6. If you want to build it yourself will need a recent version of mercurial to clone the repository, and MonoDevelop to compile the application.

share|improve this answer
It opens in my Windows 7 machine 64 bits, but it doesn't render the md document, it only shows the source. Nonetheless, it's amazing that a mono application just ran without a crash in my machine. :) –  GmonC Nov 21 '10 at 0:44

2 more tools:
- Showdown is JavaScript port or Markdown: https://github.com/coreyti/showdown . You can use it only from browser
- txt2tags can read Markdown format but it adds a lot of new options and featues: http://txt2tags.org/online.php

share|improve this answer

Assuming you want to see what the html looks like: Use a web browser (with an addon) as a viewer.

For example, for Google Chrome there's TextDown which also lets you edit files straight in the browser and see a live preview.

After adding it, you also need to go to chrome://chrome/extensions/ and check "allow access to file URLs" so you can open local files. A warning though: if you save (shift-ctrl-s) TextDown does not save to the file you opened but to your downloads folder.

share|improve this answer
There is also this extension for Firefox, which you can then get working by following this. –  Wilf Feb 28 '14 at 13:50

Here is a commandline script which opens up a markdown file in your browser after converting it into html: http://minhajuddin.com/2012/03/16/markdown-viewer-script-for-your-markdown-documents/

share|improve this answer

A couple comments asked about or mentioned the possibility of using a browser add-on. I like this approach because I can edit markdown files in any Linux text editor (from nano to vim to Kate) and view the files in Firefox (my browser of choice).

I simply installed this Firefox add-on and it worked out of the box on Kubuntu 12.04 and Firefox 33.0. No tweaks required.

Markdown Viewer :: Add-ons for Firefox

(I also like ReText, but I would prefer to see something like ReText implemented as a plugin for Kate. ReText lacks too many features to compete with mature editors like Kate.)

share|improve this answer

For those who prefer w3m (vi style bindings):

pandoc file.md | w3m -T text/html

I put it in a script, mdview.sh, and put that in my path:

pandoc $1 | w3m -T text/html
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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