• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

libreoffice: command not found

by Deepika

LibreOffice is a free and open-source office suite, which includes programs for word processing, spreadsheets, presentations, graphics, and databases. The command line interface (CLI) for LibreOffice allows users to perform various tasks, such as converting documents to different formats, automating tasks, and scripting.

The basic syntax for using the LibreOffice CLI is “libreoffice [options] [file]”, where options specify the desired action and file is the path to the document you want to work with. For example, the command “libreoffice –headless –convert-to pdf file.docx” will convert a Word document to a PDF in headless mode (meaning without opening the LibreOffice GUI).

Some common options for the LibreOffice CLI include:

  • –headless: runs LibreOffice in the background without opening the GUI
  • –convert-to: converts a document to a specified format
  • –print-to-file: prints a document to a file
  • –invisible: runs LibreOffice without showing the GUI
  • –nologo: suppresses the display of the logo when starting LibreOffice.

It’s worth noting that in addition to these basic options, LibreOffice also provides advanced options like –writer, –calc, –impress, and –draw that allow you to launch the specific module of LibreOffice, and also advanced command line options like –accept= and –infilter= that allow you to set up the connection to a remote server and the filter options respectively.

If you encounter the below error while running the command libreoffice:

libreoffice: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install libreoffice-common
Ubuntu apt-get install libreoffice-common
Alpine apk add libreoffice-common
Arch Linux pacman -S libreoffice-common
Kali Linux apt-get install libreoffice-common
CentOS yum install libreoffice-common
Fedora dnf install libreoffice-common
Raspbian apt-get install libreoffice-common

libreoffice Command Examples

1. Open a space-separated list of files in read-only mode:

# libreoffice --view path/to/file1 path/to/file2

2. Display the content of specific files:

# libreoffice --cat path/to/file1 path/to/file2

3. Print files to a specific printer:

# libreoffice --pt printer_name path/to/file1 path/to/file2

4. Convert all `.doc` files in current directory to PDF:

# libreoffice --convert-to pdf *.doc

Filed Under: Linux

Some more articles you might also be interested in …

  1. e4defrag: command not found
  2. kustomize Command Examples
  3. usermod Command Examples in Linux
  4. gdal_contour: Create contour lines and polygons from a digital elevation model
  5. cockpit-ws Command Examples in Linux
  6. partprobe: command not found
  7. extrace Command Examples in Linux
  8. vgchange Command Examples in Linux
  9. nmcli agent Command Examples in Linux
  10. How to Find Filesystem Inode Utilization in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright