在 Debian 上启动 LibreOffice 有几种常见方式,取决于你使用的环境(桌面或命令行)。
如果你安装了桌面环境(如 GNOME、KDE、XFCE):
libreoffice
或
soffice
libreoffice --writer
libreoffice --calc
libreoffice --impress
libreoffice --draw
libreoffice example.docx
libreoffice data.ods
如果 没有桌面环境,不能直接打开 GUI,但可以用于:
libreoffice --headless --convert-to pdf example.docx
libreoffice --headless --accept="socket,host=127.0.0.1,port=2002;urp;"
sudo apt update
sudo apt install libreoffice
只装部分组件(更轻量):
sudo apt install libreoffice-writer libreoffice-calc
command not found: libreoffice
说明未安装,或 PATH 问题(一般 Debian 默认可用)。
--headless如果你是在 Debian Server / WSL / 远程 SSH 环境,告诉我,我可以给你更合适的启动方式。