LaTeX on GNU/Linux


Remove all LaTeX packages on you system first, for a clean installation of the latest TexLive installation. For a clean removal of the LaTeX packages please see here for some hints.

As said earlier there are multiple ways of getting a TeX distribution. However, we recommend the usage of TeXLive on GNU/Linux. This guide describes how to install it on your system.


Do not install TeXLive from your operating system’s package manager. It is possible that it will not install the latest version, which is needed to get the latest BFH LaTeX packages.

Basic Packages


# apt install -y unzip wget perl

TexLive Manager

  • Create temporary folder

    $ mkdir /tmp/texlive && cd /tmp/texlive
  • Download the TeXLive installer for linux.

    $ wget
  • Unzip

    $ unzip ./ -d install-tl
  • Change to the exctracted directory

    $ cd install-tl/install-tl-$(date +%Y%m%d)
  • Start the installation

    # perl ./install-tl
    ======================> TeX Live installation procedure <=====================
    ======>   Letters/digits in <angle brackets> indicate   <=======
    ======>   menu items for actions or customizations      <=======
    = help>   <=======
     Detected platform: GNU/Linux on x86_64
     <B> set binary platforms: 1 out of 16
     <S> set installation scheme: scheme-full
     <C> set installation collections:
         40 collections out of 41, disk space required: 7231 MB
     <D> set directories:
       TEXDIR (the main TeX directory):
       TEXMFLOCAL (directory for site-wide local files):
       TEXMFSYSVAR (directory for variable and automatically generated data):
       TEXMFSYSCONFIG (directory for local config):
       TEXMFVAR (personal directory for variable and automatically generated data):
       TEXMFCONFIG (personal directory for local config):
       TEXMFHOME (directory for user-specific files):
     <O> options:
       [ ] use letter size instead of A4 by default
       [X] allow execution of restricted list of programs via \write18
       [X] create all format files
       [X] install macro/font doc tree
       [X] install macro/font source tree
       [ ] create symlinks to standard directories
     <V> set up for portable installation
     <I> start installation to hard disk
     <P> save installation profile to 'texlive.profile' and exit
     <Q> quit
    Enter command: 
  • Press S to change the scheme

    Select scheme:
     a [X] full scheme (everything)
     b [ ] medium scheme (small + more packages and languages)
     c [ ] small scheme (basic + xetex, metapost, a few languages)
     d [ ] basic scheme (plain and latex)
     e [ ] minimal scheme (plain only)
     f [ ] ConTeXt scheme
     g [ ] GUST TeX Live scheme
     h [ ] infrastructure-only scheme (no TeX at all)
     i [ ] teTeX scheme (more than medium, but nowhere near full)
     j [ ] custom selection of collections
    Actions: (disk space required: 7231 MB)
     <R> return to main menu
     <Q> quit
    Enter letter to select scheme: 
  • Select small scheme (c)

  • Return to main menu (R)

  • Install TeXLive (I)

  • After the installation completed, add a symlink to /usr/local/bin


    Replace the <YEAR> in the path with your target version.

    # /usr/local/texlive/<YEAR>/bin/x86_64-linux/tlmgr path add

Required TeX Packages


Always update symlinks for freshly installed LaTeX binaries

# tlmgr path add


If you prefer a GUI for installing additional packages, use following command to start tlmgr as a GUI.

# tlmgr --gui
  • Download tex-requirements.txt

  • Install the packages listed in tex-requirements.txt

    # tlmgr install `cat tex-requirements.txt`
  • Update the symlinks again

    # tlmgr path add


  • Check if nunito is installed on your system

    nunito is the default font for the BFH CI and thus needed

    # tlmgr list --only-installed --data name | grep nunito
  • If the output of the previous command is empty then install nunito manually

    # tlmgr install nunito

Additional Tools/Packages


A Perl script to compile LaTeX source file, highly recommended. Read the section about Latexmk for more information about the CLI build tool.

# tlmgr install latexmk 


Inkscape is used either to draw vector graphics and/or to convert SVGs into PDFs on-the-fly. A conversion is needed because LaTeX has no native support for the SVG format.

# apt install -y inkscape libcanberra-gtk-module


Biber can be used to create bibliographies in LaTeX

# tlmgr install biber


To work with Makefiles

# apt install -y make


As described earlier, you can literally use any plain text editor which has syntax highlighting for TeX. However, for beginners we recommend installing on of the editors listed below.


Edit TeX files (GNU/Linux only; Recommended if you use GNOME as desktop environment)

# apt install -y latexila


Edit TeX files (An alternative to LeTeXila; Also available for OS X and Windows)

# apt install -y texstudio


Edit TeX files (An alternative to LeTeXila and TeXStudio; Also available for OS X and Windows)

# apt install -y texworks texworks-scripting-lua texworks-scripting-python

VS Code

General purpose editor, together with the extension LaTeX Workshop

Installation Documentation