How to open word document file in terminal?
Technically speaking xdg-open
should work for all file types. It'll just open them in the appropriate application. All the document mime types are mapped to Libre Office by default so this should just work:
xdg-open document.doc
You can open it with help of libre-office-writer by following command (open with libre office writer):
lowriter "<path/to/file>"
From man libreoffice
:
Name libreoffice - LibreOffice office suite SYNOPSIS libreoffice [--accept=accept-string] [--base] [--calc] [--convert-to output_file_extension[:output_filter_name] [--outdir output_dir] file]... [--display display] [--draw] [--global] [--headless] [--help|-h|-?] [--impress] [--invisible] [--infilter=""] [--math] [--minimized] [-n file]... [--nodefault] [--nolockcheck] [--nologo] [--norestore] [-o file]... [-p file...] [--print-to-file [--printer-name printer_name] [--outdir output_dir] file]... [--pt printername file...] [--show Impress file]... [--unaccept=accept-string] [--terminate_after_init] [--view file]... [--web] [--writer] [file...] lobase localc lodraw lofromtemplate loimpress lomath loweb lowriter DESCRIPTION LibreOffice (LO for short) is a multi-platform office productivity suite.
It should work with Libre Office.
libreoffice document.docx