LinuxCommandLibrary

libreoffice

Open and edit office documents

TLDR

Open one or more files in read-only mode

$ libreoffice --view [path/to/file1 path/to/file2 ...]
copy

Display the content of one or more files
$ libreoffice --cat [path/to/file1 path/to/file2 ...]
copy

Print files using a specific printer
$ libreoffice --pt [printer_name] [path/to/file1 path/to/file2 ...]
copy

Convert all .doc files in current directory to PDF
$ libreoffice --convert-to pdf *.doc
copy

SYNOPSIS

libreoffice [options] [files...]

PARAMETERS

--help
    Displays help information and exits.

--version
    Displays the LibreOffice version number and exits.

--writer
    Opens LibreOffice Writer (word processor).

--calc
    Opens LibreOffice Calc (spreadsheet).

--impress
    Opens LibreOffice Impress (presentation).

--draw
    Opens LibreOffice Draw (vector graphics editor).

--base
    Opens LibreOffice Base (database management).

--math
    Opens LibreOffice Math (formula editor).

--headless
    Runs LibreOffice in headless mode (without a graphical user interface). Useful for batch processing.

--convert-to [:options]
    Converts files to the specified format. Requires --headless.

--print-to-file []
    Prints files to file. Requires --headless.

--invisible
    Starts LibreOffice without displaying the splash screen.


    Opens the specified file(s) in the appropriate LibreOffice application.

DESCRIPTION

The libreoffice command is the primary entry point for launching the LibreOffice suite of applications.
LibreOffice is a comprehensive and free office productivity suite that provides tools for word processing, spreadsheets, presentations, databases, drawing, and mathematical formulas. The libreoffice command allows you to start LibreOffice and optionally specify which application to open (e.g., Writer, Calc, Impress) or a specific document to load.
When executed without any arguments, it usually opens the LibreOffice start center, providing access to all available applications and recent documents. Its cross-platform nature, open file formats and focus on community-driven development make it a popular alternative to proprietary office suites.

COMMON USE CASES

Common use cases include: starting the office suite, opening a specific document type directly (e.g., libreoffice --writer document.odt), converting documents to other formats (e.g., libreoffice --headless --convert-to pdf document.odt), and running automated document processing scripts using the headless mode.

SEE ALSO

soffice(1)

Copied to clipboard