How to open docx on linux

How to open Microsoft Word documents in Linux

In an office or production environment, sharing documents between different applications and operating systems is a common issue. If you need to create, open, and edit Microsoft Word documents in Linux, you can use LibreOffice Writer or AbiWord. Both are robust word processing applications that read and write files in Word .doc and .docx formats.

If you need command-line tools that extract the text from Word files, Antiword (.doc files) and docx2txt (.docx) are useful programs to have at your disposal.

In this tutorial, we’ll look at these four applications and how you can use them. We’ll walk through installing them on several of the most popular Linux distributions, including Debian, Ubuntu, Fedora, OpenSUSE, CentOS, and Arch Linux. We’ll also help with installing the core Microsoft TrueType fonts on your Linux system.

LibreOffice

LibreOffice is a free, open-source, actively maintained and frequently updated office productivity suite that is compatible with Microsoft Office applications, including Microsoft Word. You can save your LibreOffice Writer documents in .doc or .docx format, and then either opens correctly in Microsoft Word.

Installing LibreOffice

LibreOffice can be installed using your package manager. To install it, open a terminal and use the following command appropriate for your operating system:

Debian 8, Ubuntu 15

Fedora 23

OpenSUSE 10

CentOS 7

Arch Linux 2016

Once LibreOffice is installed, it should appear in the Applications menu of your GUI. You can also run it from a terminal with the command:

AbiWord

AbiWord is another free and open-source word processor. It has a clean, simple interface developed for almost twenty years. Like LibreOffice, it can open, edit, and save Microsoft Word .doc and .docx files. Unlike LibreOffice, Abiword is not a complete office suite, so it has a smaller footprint and consumes fewer system resources.

Installing AbiWord

Debian 8, Ubuntu 15

Fedora 23

OpenSUSE 10

CentOS 7

Arch Linux 2016

Antiword

Antiword is a command-line tool that converts the contents of a .doc file to plain text.

Antiword only converts .doc files. If you need to convert a .docx file, see docx2txt in the next section.

Using Antiword

Running antiword with the name of a Word .doc file outputs the plain text of the file to standard output.

Antiword does a great job of formatting tables. It also has options for including images as PostScript objects and outputting to PDF.

You can redirect the output to a text file:

Or, if you want to open it directly in a text editor, you can pipe the text to vim:

Installing antiword

Debian 8, Ubuntu 15

Fedora 23

OpenSUSE 10

CentOS 7

Docx2txt

Docx2txt is a command-line tool that converts .docx files to plain text. (It does not convert .doc files.)

Читайте также:  Linux терминал комбинации клавиш

To print the contents of a .docx file to the terminal screen or a file, call docx2txt and specify a dash as the output file name. In this example, notice the dash at the end of the command.

To convert a .docx file and output to a text file, use the command form:

To open the .docx text in vim, use the command form:

To open it in nano:

To install doc2txt, follow the instructions for your version of Linux below:

Debian 8

Ubuntu 15

Fedora 23

Fedora’s repositories do not offer a package for docx2txt, but you can install it manually:

Download the source from SourceForge’s docx2txt page. Extract the archive:

You need to make sure that perl, unzip and make are installed on your system, so install or upgrade those packages now:

Then, run make as the root user to install:

Docx2txt is now installed as docx2txt.sh. For instance, to convert the file word-document.docx to a text file, you can run:

The converted text file automatically saves as word-document.txt.

OpenSUSE 10

SUSE repositories do not offer a package for docx2txt, but you can download it from SourceForge’s docx2txt page. Extract the archive:

You need to make sure that perl, unzip and make are installed on your system, so install or upgrade those packages now:

Then, run make as root to install:

Docx2txt is now installed as docx2txt.sh. For instance, to convert the file word-document.docx to a text file, you can run:

The converted text file is automatically saved as word-document.txt.

CentOS 7

CentOS repositories do not offer a package for docx2txt, but you can download it from SourceForge’s docx2txt page. Extract the archive:

You need to make sure that perl, unzip and make are installed on your system, so install or upgrade those packages now:

Then, run make as root to install:

Docx2txt is now installed as docx2txt.sh. For instance, to convert the file word-document.docx to a text file, you can run:

The converted text file is automatically saved as word-document.txt.

Arch Linux 2016

Installing Microsoft-compatible fonts

The core Microsoft fonts are available on Linux. Install them if you are going to be working with Microsoft Word files — especially if they were created on a Windows system. The core fonts include:

  • Andale Mono
  • Arial
  • Arial Black
  • Calabri
  • Cambria
  • Comic
  • Courier
  • Impact
  • Times
  • Trebuchet
  • Verdana
  • Webdings

To install them, follow these steps:

Debian 8, Ubuntu 15

Fedora 23

Install packages required for installation:

Then install the local RPM package:

OpenSUSE 10

Install packages required for installation:

Then install the local RPM package:

CentOS 7

Install packages required for installation:

Then install the local RPM package:

Arch Linux 2016

Install packages required for installation:

Extract the contents of the local RPM package:

This command extracts the raw contents of the RPM file and creates two directories, etc and usr that correspond to your /etc and /usr directories. The font files themselves are located in usr/share/fonts/msttcore.

Источник

How to open docx with linux?

Linux is an operating system used to run personal computers and servers, and in the desktop environment is popular in universities and amongst people who choose to support open source software. Microsoft, the makers of WIndows and of the popular MS Office suite of applications generally don’t offer software for the Linux platform, leading to compatibility problems and meaning the docx, MS Word 2007′s native format can be difficult to open on a Linux desktop.

The docx file format was first released publicly in 2007 with the release of MS Office 2007, and has quickly become one of the major file formats used by virtue of the number of installations of their flagship software. Whilst the docx document format is an open format that can be read by unzipping the package contents and viewing the XML files in a text editor, this is far different from being able to open the file in a word processor and retain the author’s formatting or paragraphs, breaks, columns, fonts, and embedded objects.

Читайте также:  Linux файрвол открыть порт

There is thus a demand for complete compatibility on Linux systems for the docx format. OpenOffice 3.0, the latest release of the most popular open source office suite now opens, edits, and saves docx files natively, and effectively reversing two years of incompatibility. Some users of Linux have stated however that that degree of compatibility is still flawed owing to different system fonts installed by default on Windows and Linux.

A translator tool developed by Novell, the OpenOffice OpenXML Translator, which is the same tool used in OpenOffice v3.0 can be installed on older version two installations of OpenOffice, either by downloading the compiled package or installing from source using the command line. This technique, which installs the odf-converter adds the docx open and save dialog options to OpenOffice.

For occasional conversion of docx to Linux friendly file formats, online docx converters are probably a more convenient option, requiring only an Internet connection. Several websites offer to convert docx to doc, pdf, rtf, or other formats that can be opened natively in a Linux text editor or other word processor such as KWord, Abiword, OpenOffice, or TextMaker.

Источник

ZapTech

В офисной или производственной среде общий доступ к документам между различными приложениями и операционными системами. Если вам нужно создавать, открывать и редактировать документы Microsoft Word в Linux, вы можете использовать LibreOffice Writer или AbiWord. Оба являются надежными текстовыми приложениями, которые могут читать и записывать файлы в форматах Word .doc и .docx.

Если вам нужны инструменты командной строки, которые извлекают текст из файлов Word, Antiword (файлы .doc) и docx2txt (.docx) являются полезными программами, которые вы можете использовать.

В этом уроке мы рассмотрим эти четыре приложения и то, как вы можете их использовать. Мы рассмотрим их установку в нескольких самых популярных дистрибутивах Linux, включая Debian, Ubuntu, Fedora, OpenSUSE, CentOS и Arch Linux. Мы также поможем с установкой основных шрифтов Microsoft TrueType в вашей системе Linux.

LibreOffice — это бесплатный, активно поддерживаемый и часто обновляемый пакет офисной производительности с открытым исходным кодом, совместимый с приложениями Microsoft Office, включая Microsoft Word. Вы можете сохранить свои документы LibreOffice Writer в формате .doc или .docx, а затем либо правильно открыть в Microsoft Word.

Установка LibreOffice

LibreOffice может быть установлен с помощью вашего менеджера пакетов. Чтобы установить его, откройте терминал и используйте следующую команду, соответствующую вашей операционной системе:

Debian 8, Ubuntu 15

Fedora 23

OpenSUSE 10

CentOS 7

Arch Linux 2016

После установки LibreOffice он должен появиться в меню «Приложения» вашего графического интерфейса. Вы также можете запустить его из терминала с помощью команды:

AbiWord

AbiWord — еще один бесплатный текстовый процессор с открытым исходным кодом. Он имеет простой и понятный интерфейс и разрабатывается почти двадцать лет. Как и LibreOffice, он может открывать, редактировать и сохранять файлы Microsoft Word .doc и .docx. В отличие от LibreOffice, Abiword не является полным офисным пакетом, поэтому он занимает меньше места и потребляет меньше системных ресурсов.

Установка AbiWord

Debian 8, Ubuntu 15

Fedora 23

OpenSUSE 10

CentOS 7

Arch Linux 2016

Antiword

Antiword — это инструмент командной строки, который может преобразовать содержимое файла .doc в обычный текст.

Читайте также:  Linux имеет открытый код

Примечание. Antiword конвертирует только файлы .doc. Если вам нужно конвертировать файл .docx, см. Docx2txt в следующем разделе.

Использование Antiword

Запуск анти-слова с именем файла Word .doc выведет обычный текст файла в стандартный вывод.

Antiword отлично справляется с форматированием таблиц. Он также имеет опции для включения изображений в качестве объектов PostScript и вывода в PDF.

Вы можете перенаправить вывод в текстовый файл:

или, если вы хотите открыть его непосредственно в текстовом редакторе, вы можете передать текст в vim:

Установка антислов

Debian 8, Ubuntu 15

Fedora 23

OpenSUSE 10

CentOS 7

Docx2txt

Docx2txt — это инструмент командной строки, который преобразует файлы .docx в обычный текст. (Он не конвертирует файлы .doc.)

Чтобы распечатать содержимое файла .docx на экране терминала или перенаправить вывод в файл, вызовите docx2txt и укажите дефис в качестве имени выходного файла. В этом примере обратите внимание на тире в конце команды:

Чтобы преобразовать файл .docx и вывести его в текстовый файл, используйте форму команды:

Чтобы открыть текст .docx в vim, используйте форму команды:

Чтобы открыть его в нано:

Чтобы установить doc2txt, следуйте инструкциям для вашей версии Linux ниже:

Debian 8

Ubuntu 15

Fedora 23

Репозитории Fedora не предлагают пакет для docx2txt, но вы можете установить его вручную:

Загрузите исходный код из SourceForge по адресу //sourceforge.net/projects/docx2txt/. Распакуйте архив:

Вы должны убедиться, что perl, unzip и make установлены в вашей системе, поэтому установите или обновите эти пакеты сейчас:

Затем запустите make от имени пользователя root для установки:

Docx2txt теперь установлен как docx2txt.sh . Например, чтобы преобразовать файл word-document.docx в текстовый файл, вы можете запустить:

Преобразованный текстовый файл будет автоматически сохранен как word-document.txt .

OpenSUSE 10

Репозитории SUSE не предлагают пакет для docx2txt, но вы можете скачать его с SourceForge по адресу //sourceforge.net/projects/docx2txt/. Распакуйте архив:

Вы должны убедиться, что perl, unzip и make установлены в вашей системе, поэтому установите или обновите эти пакеты сейчас:

Затем запустите make от имени root для установки:

Docx2txt теперь установлен как docx2txt.sh . Например, чтобы преобразовать файл word-document.docx в текстовый файл, вы можете запустить:

Преобразованный текстовый файл будет автоматически сохранен как word-document.txt .

CentOS 7

В репозиториях CentOS нет пакета для docx2txt, но вы можете скачать его с SourceForge по адресу //sourceforge.net/projects/docx2txt/. Распакуйте архив:

Вы должны убедиться, что perl, unzip и make установлены в вашей системе, поэтому установите или обновите эти пакеты сейчас:

Затем запустите make от имени root для установки:

Docx2txt теперь установлен как docx2txt.sh . Например, чтобы преобразовать файл word-document.docx в текстовый файл, вы можете запустить:

Преобразованный текстовый файл будет автоматически сохранен как word-document.txt .

Arch Linux 2016

Установка Microsoft-совместимых шрифтов

Основные шрифты Microsoft доступны в Linux, и вам следует установить их, если вы собираетесь работать с файлами Microsoft Word — особенно, если они были созданы в системе Windows. Основные шрифты включают в себя:

  • Андале Моно
  • Arial
  • Arial Black
  • Calabri
  • Камбрия
  • комический
  • курьер
  • Влияние
  • раз
  • Требушет
  • Verdana
  • Webdings

Чтобы установить их, выполните следующие действия:

Debian 8, Ubuntu 15

Fedora 23

Загрузите RPM-пакет установщика msttcore из SourceForge.

Установите пакеты, необходимые для установки:

Затем установите локальный пакет RPM:

OpenSUSE 10

Загрузите RPM-пакет установщика msttcore из SourceForge.

Установите пакеты, необходимые для установки:

Затем установите локальный пакет RPM:

CentOS 7

Загрузите RPM-пакет установщика msttcore из SourceForge.

Установите пакеты, необходимые для установки:

Затем установите локальный пакет RPM:

Arch Linux 2016

Загрузите RPM-пакет установщика msttcore из SourceForge.

Установите пакеты, необходимые для установки:

Извлеките содержимое локального пакета RPM:

Эта команда извлекает необработанное содержимое файла RPM и создает два каталога, etc и usr, которые соответствуют вашим каталогам / etc и / usr . Сами файлы шрифтов находятся в usr / share / fonts / msttcore .

Источник

Оцените статью