Skip to content

Instantly share code, notes, and snippets.

@kiwnix
Forked from eylenburg/msoffice_in_linux.md
Created October 1, 2024 11:38
Show Gist options
  • Save kiwnix/7fba4d0ab0e34357a52af22c84727bef to your computer and use it in GitHub Desktop.
Save kiwnix/7fba4d0ab0e34357a52af22c84727bef to your computer and use it in GitHub Desktop.
Installing Microsoft Office in Linux

There are multiple options how to install MS Office on Linux.

Wine-based

  1. Bottles -> didn't work for me, probably because you can't install 32-bit dependencies
  2. PlayOnLinux -> the Office 2010 script worked for me, Office 2013 script not tested, Office 2016 failed to install with their script. Newer versions not supported.
  3. Crossover (paid) -> apparently supports Office 2016 and older. I didn't try it but it seems to be the easiest way to get a semi-modern office working in Linux.

VM-bsaed - Integrate Windows apps running in a Windows VM as native-looking in Linux

  1. Winapps, based on KVM, QEMU, Virt-Manager, and FreeRDP. Still actively maintained (getting Github commits).
  2. Cassowary, based on KVM, QEMU, Virt-Manager, and FreeRDP. Has a helpful GUI and apparently can auto-suspend the VM when no Windows app is in use.

The latter option means you can run Office 2021 or Office 365 including all apps, but for me it was quite buggy and when I encounterd some (FreeRDP-related?) bug in both Winapps and Cassowary that meant I could only start Excel with an external screen plugged in, I gave up. bug

The first option limits you to Office 2016 and only the core apps (Excel, Powerpoint, Word) are working. Office 2016 is still mostly okay although you're going to miss out on some useful Excel function like IFS, MINIFS, MAXIFS, XLOOKUP, UNIQUE, and SWITCH (see here for a full list).

This guide is largely based on this one from Jaydin which comes with some helpful screenshots.

Step by step guide for Office 2016

Step 0: Get Office

Log in to your Microsoft account, download the MS Office "offline" image (multiple GB, ending in .img) and note down your product key (this can also be found in your Microsoft account at the same place where you download the .img file)


Step 1: Mount the installation disk

For example mkdir ~/msoffice/msoffice2016/image && sudo mount -o loop Office2016HomeStudentRetail.img ~/msoffice/msoffice2016/image/


Step 2: Install Distrobox:

OpenSUSE: sudo zypper install distrobox podman (or install through Yast Software) OpenSUSE Kalpa/Aeon: already preinstalled Fedora: sudo dnf install distrobox Fedora Kinoite/Silverblue: sudo rpm-ostree install distrobox and reboot Debian 12 & Ubuntu 23.04 and newer: sudo apt install distrobox podman Arch: sudo pacman -S distrobox podman

For other distros, look here: https://github.com/89luca89/distrobox#installation


Step 3: Set up your container

We will be using a Ubuntu 18.04 container because this is the last version supporting 32-bit packages. Yes, Ubuntu 18.04 is end-of-life and won't get any more security updates, but the same is true for Office 2016.

I would recommend to have a separate /home folder for the distrobox container to avoid mixing files with your normal /home folder.

Enter this command: distrobox-create --name msoffice2016 --image docker.io/library/ubuntu:18.04 --home ~/msoffice/msoffice2016/ && distrobox enter msoffice2016


Step 4: Set up PlayOnLinux in container

sudo dpkg --add-architecture i386 wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add - sudo wget http://deb.playonlinux.com/playonlinux_bionic.list -O /etc/apt/sources.list.d/playonlinux.list sudo apt-get update sudo apt-get install netcat gettext wine-stable:i386 smbclient winbind playonlinux winetricks winetricks dotnet45 and follow the .NET installation wizard that pops up.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment