Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As I mentioned there , how can I view documents( ex: .doc,.docx and all other formats ) from the command line ? Is there any way ?

Thank you.

share|improve this question
It is a terminal, not a word processor! So basically, it's not possible. – simbadub23 Oct 24 '13 at 6:49
Do you want to see the doc formatted with different fonts and so on, or just have the text content dumped to the screen? – FreudianSlip Oct 24 '13 at 6:49
@FreudianSlip any , just want to view it with out any much modifications to the content. – Raja Oct 24 '13 at 6:56
up vote 5 down vote accepted

I have been using the following setup in several scripts (especially with version control):

sudo apt-get install unoconv odt2txt     # installs both tools
doc2odt test.doc                         # creates test.odt
odt2txt test.odt                         # displays the contents in the terminal

or for a docx file:

docx2txt test.docx                       # converts docx file
less test.txt                            # read the contents

Works like a charm and you can read your doc files in the terminal. This method is more complex than catdoc but it has the advantage that entries from a bibliographic management system are not displayed in their raw form.

For a LaTex file you can just your favorite terminal text editor to open and read it.

share|improve this answer
Hey , thanks for looking my post. could you explain this little bit " the advantage that entries from a bibliographic management system are not displayed in their raw form" – Raja Oct 24 '13 at 8:38
For academic writing people might use things like Mendeley, Endnote, JabRef to manage their citation references . With catdoc these appear as [ADDIN: {author: Don Joey} { title: ...} ...]. When you have many of them that is hard to read. This is where odt2txt conversion comes in handy because you will just see Don Joey, Some Supposedly Interesting Book,... rather than the raw info. – don.joey Oct 24 '13 at 8:42
Ok Now I understood but I think the support of LaTex is missing here right ? catdoc can do that. – Raja Oct 24 '13 at 8:43
For LaTex you can just use vim. After all that's the goal of LaTex, to type text as is and convert it to publishable text afterwards. – don.joey Oct 24 '13 at 8:44
No I mean to say that , If DOC consists of some symbolic things then Latex support we need to view them best . so is this can provide ? becasue Catdoc can provide that – Raja Oct 24 '13 at 8:46

To View word documents from the command line I found one named as catdoc.

to install it sudo apt-get install catdoc


catdoc -t filename.doc

You can specify the output format using the -a (text) or -t (LaTeX) option

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.