MiKTeX is available for selected Linux distributions.

How to install MiKTeX on Linux

Installing MiKTeX on Linux involves these steps:

  1. Register the GPG key with which MiKTeX installation packages and metadata is signed. The key ID is: D6BC243565B2087BC3F897C9277A7293F59E4889
  2. Register the installation source which contains the MiKTeX installation package.
  3. Use the package management system to install MiKTeX.

Ubuntu, Linux Mint

1. Register GPG key

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889

2. Register installation source

Ubuntu 18.04, Linux Mint 19
echo "deb http://miktex.org/download/ubuntu bionic universe" | sudo tee /etc/apt/sources.list.d/miktex.list
Ubuntu 16.04, Linux Mint 18.3
echo "deb http://miktex.org/download/ubuntu xenial universe" | sudo tee /etc/apt/sources.list.d/miktex.list

3. Install MiKTeX

sudo apt-get update
sudo apt-get install miktex

Debian 9

1. Register GPG key

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889

2. Register installation source

echo "deb http://miktex.org/download/debian stretch universe" | sudo tee /etc/apt/sources.list.d/miktex.list

3. Install MiKTeX

sudo apt-get update
sudo apt-get install miktex

Fedora 28

1. Register GPG key

sudo rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xD6BC243565B2087BC3F897C9277A7293F59E4889"

2. Register installation source

sudo curl -L -o /etc/yum.repos.d/miktex.repo https://miktex.org/download/fedora/28/miktex.repo

3. Install MiKTeX

sudo dnf update
sudo dnf install miktex

openSUSE Leap 15

1. Register GPG key

sudo rpm --import "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xD6BC243565B2087BC3F897C9277A7293F59E4889"

2. Register installation source

sudo curl -L -o /etc/zypp/repos.d/miktex.repo https://miktex.org/download/opensuse/15/miktex.repo

3. Install MiKTeX

sudo zypper update
sudo zypper install miktex

Finishing the setup

Before you can use MiKTeX, you have to finish the setup. You can use MiKTeX Console or, if you prefer the command line, miktexsetup.

Start MiKTeX Console to finish the setup

Search&click the MiKTeX Console icon to start MiKTeX Console:

Image Text

Now is the time to make a decision:

Do you want to set up a private (for you only) TeX installation, or do you want to set up a shared (system-wide) TeX installation?

You probably want to choose the first option.

The second option makes sense if you are the administrator of a multi-user system. If this is the case and if you expect that some of your users would like to work with MiKTeX, then you should install MiKTeX system-wide.

Click one of the two buttons if you have made your decision.

Run miktexsetup to finish the setup

Run

miktexsetup finish

to finish with a private (for you only) TeX installation. Executables like lualatex will be installed in ~/bin.

Run

sudo miktexsetup --shared=yes finish

to finish with a shafred (system-wide) TeX installation. Executables like lualatex will be installed in /usr/local/bin.

You also may want to enable automatic package installation:

initexmf --set-config-value [MPM]AutoInstall=1

Or, if you have a shared installation:

sudo initexmf --admin --set-config-value [MPM]AutoInstall=1

Upgrade option

If you have just installed MiKTeX, then you have the option to upgrade your installation to a standard TeX system. Just click the Upgrade button. Please be aware that this starts a ~200MB download.

Alternatively, you can turn on the auto-install feature and let MiKTeX install missing packages on-the-fly. This will help you to keep your TeX installation as minimal as possible (“Just enough TeX”).

See also

FAQ: Is it possible to install MiKTeX and TeX Live side-by-side?