How to open .RST files on Linux
To open .RST files on Linux, open the .rst file in any text editor to view or edit the markup.
Step-by-step instructions
- Open the .rst file in any text editor to view or edit the markup.
- To see formatted output, render it with Docutils or build documentation with Sphinx.
Common issues
The file opens as plain text and looks “unformatted”
reStructuredText is a markup language stored as plain text, so a normal editor will show the raw markup rather than a styled document.
- Open it in a text editor for reading/editing the source.
- If you want a styled view, render/convert it using Docutils or build it using Sphinx to produce HTML (or another output format).
Double-clicking does not open the file or opens in the wrong app
Your system may not have a file association for .rst (or it is associated with an app you do not want).
- Use “Open with” and choose a text editor to view it.
- Optionally change the default app association for .rst to your preferred editor.
Rendering/build fails due to syntax or directive errors
Docutils/Sphinx can reject or warn about invalid reStructuredText syntax, indentation problems, or unsupported directives/roles.
- Validate the document against the reStructuredText specification and fix indentation/structure issues.
- If building with Sphinx, confirm the directives/roles used are supported by your Sphinx configuration and extensions.
Text displays with strange characters or wrong line breaks
The file may use an unexpected encoding or line-ending style.
- Reopen the file and try a different text encoding (commonly UTF-8) in your editor.
- If needed, convert line endings (CRLF/LF) using your editor settings or a text conversion tool.
Security note
.rst is plain text, but be cautious when rendering: reStructuredText supports directives, and building with documentation tools can process external references or include content depending on tool configuration.