0

I saw that mime type is set for md extension in the following file:

$ cat /etc/mime.types | grep markdown
text/markdown                                   md markdown

But, on checking the Mime type of .md file it still shows as text/plain.

$ file --mime-type -b Mime.md
text/plain

How can I make sure that all existing and newly generated .md files have text/markdown as the MIME type? Also, will the changed Mime type would persist if I email the file to a friend (who also happens to use the same filesystem as me - ext4 )?


Also the contents of /usr/share/mime/text/markdown.xml is:

<?xml version="1.0" encoding="utf-8"?>
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="text/markdown">
  <!--Created automatically by update-mime-database. DO NOT EDIT!-->
  <comment>Markdown document</comment>
  <comment xml:lang="ast">Documentu Markdown</comment>
  <comment xml:lang="bg">Документ — Markdown</comment>
  <comment xml:lang="ca">document Markdown</comment>
  <comment xml:lang="cs">dokument Markdown</comment>
  <comment xml:lang="da">Markdown-dokument</comment>
  <comment xml:lang="de">Markdown-Dokument</comment>
  <comment xml:lang="el">Έγγραφο Markdown</comment>
  <comment xml:lang="en_GB">Markdown document</comment>
  <comment xml:lang="es">documento Markdown</comment>
  <comment xml:lang="eu">Markdown dokumentua</comment>
  <comment xml:lang="fi">Markdown-asiakirja</comment>
  <comment xml:lang="fr">document Markdown</comment>
  <comment xml:lang="ga">cáipéis Markdown</comment>
  <comment xml:lang="gl">documento de Markdown</comment>
  <comment xml:lang="he">מסמך Markdown</comment>
  <comment xml:lang="hr">Markdown dokument</comment>
  <comment xml:lang="hu">Markdown dokumentum</comment>
  <comment xml:lang="ia">Documento Markdown</comment>
  <comment xml:lang="id">Dokumen markdown</comment>
  <comment xml:lang="it">Documento Markdown</comment>
  <comment xml:lang="ja">Markdown </comment>
  <comment xml:lang="kk">Markdown құжаты</comment>
  <comment xml:lang="ko">마크다운 문서</comment>
  <comment xml:lang="lv">Markdown dokuments</comment>
  <comment xml:lang="nl">Markdown document</comment>
  <comment xml:lang="oc">document Markdown</comment>
  <comment xml:lang="pl">Dokument Markdown</comment>
  <comment xml:lang="pt">documento Markdown</comment>
  <comment xml:lang="pt_BR">Documento Markdown</comment>
  <comment xml:lang="ru">Документ Markdown</comment>
  <comment xml:lang="sk">Dokument Markdown</comment>
  <comment xml:lang="sl">Dokument Markdown</comment>
  <comment xml:lang="sr">Маркдаун документ</comment>
  <comment xml:lang="sv">Markdown-dokument</comment>
  <comment xml:lang="tr">Markdown belgesi</comment>
  <comment xml:lang="uk">документ Markdown</comment>
  <comment xml:lang="zh_CN">Markdown 文档</comment>
  <comment xml:lang="zh_TW">Markdown 文件</comment>
  <sub-class-of type="text/plain"/>
  <glob pattern="*.md"/>
  <glob pattern="*.mkd"/>
  <glob pattern="*.markdown"/>
  <alias type="text/x-markdown"/>
</mime-type>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.