Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
To install LaTeX you install a TeX distribution, not a single program: TeX Live is the standard choice on Windows and Linux, MacTeX is the TeX Live build for macOS, and MiKTeX is the main alternative on Windows. All of them are installed from the official downloads listed below, and you check the result by compiling a sample file with pdflatex. This guide covers the installation of LaTeX on each operating system, the exact TeX Live command-line recipe, a verification step and the most common failures.
What a LaTeX installation is used for in research
LaTeX is a typesetting system that researchers use for manuscripts, theses, equations, posters and journal templates. A local installation gives you the compilers (pdflatex, XeLaTeX, LuaLaTeX), thousands of packages and the tools to manage them, so you can compile offline and keep a project under version control. If you only need to write and compile occasionally, a web editor avoids installation altogether (see the alternatives table below). If a journal or funder template needs a package you must control, or you work without a reliable connection, a local distribution is the better fit.
Install or access LaTeX
Download each distribution only from its own project site. The data table below sets out which distribution is offered for which operating system, the official source and what the installer provides; it was compiled from the TeX Users Group (TUG) pages for TeX Live and MacTeX and from the MiKTeX download page, read on 2026-11-14.
Windows
TUG recommends running install-tl-windows.exe (downloaded from https://mirror.ctan.org/systems/texlive/tlnet/install-tl-windows.exe) or install-tl-iso-windows.exe, which downloads a 6+ GB ISO image and then runs the installer, which is often faster. The “Advanced” button in the installer exposes the options. The installer adds the TeX binaries to the search path itself, creates a TeX Live submenu in the Start menu (including the tlmgr graphical package manager) and offers optional file associations. TeX Live includes its own minimal Perl and Tcl/Tk, which are not put on your PATH. From TeX Live 2023 onward the Windows binaries are 64-bit only; 32-bit systems need the 2022 release. Windows 11 on ARM can run the 64-bit binaries by emulation, Windows 10 on ARM cannot.
MiKTeX is the alternative: its download page offers a Basic Installer, a Net Installer and the MiKTeX Setup Utility (miktexsetup) for unattended installation. The Basic Installer is minimal; enabling on-demand package installation lets MiKTeX fetch packages when a document needs them. Our separate MiKTeX guide covers that route in detail.
macOS
TUG recommends MacTeX on macOS. MacTeX installs the full TeX Live and a GUI-Applications subpackage in /Applications/TeX that includes the TeXShop editor; the current release requires macOS 11 Big Sur or later and runs natively on Intel and Apple silicon. BasicTeX is the smaller package with the same macOS requirement; it corresponds to TeX Live’s small scheme and supports pdfLaTeX, XeLaTeX and LuaLaTeX. The Unix script method below also works on macOS (supported from macOS 10.6), and older macOS releases (10.3 to 10.15) have their own page of older versions on the MacTeX site. MiKTeX’s download page currently lists only a 2022 disk image for macOS, so it is not the default choice there. See our MacTeX guide and the guide to LaTeX editors on macOS.
Linux and other Unix systems
Install TeX Live with the install-tl script (next section). The script needs a standard Perl on the system. MiKTeX also publishes repositories for specific distributions (for example Ubuntu, Debian, Fedora, Rocky Linux and openSUSE Leap, with the supported versions listed on its download page); you import its GPG key, add the repository, install with your package manager and finish with MiKTeX Console or miktexsetup.
Step-by-step: install TeX Live on Linux or other Unix
These are the commands from the TeX Live quick install page. TUG notes you do not need to be root and recommends installing as a normal user (except on macOS), and that multiple TeX Live releases can coexist, so you do not need to remove an old TeX first.
- Change to a temporary directory:
cd /tmp - Download the installer:
wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz(orcurl -L -o install-tl-unx.tar.gzwith the same address). - Unpack it:
zcat < install-tl-unx.tar.gz | tar xf - - Enter the unpacked directory:
cd install-tl-2* - Run the installer:
perl ./install-tl --no-interaction. Omit--no-interactionif you want to choose options yourself. The destination must be writable, so run it as root or choose a directory you own with--texdir. TUG warns that the default install can take several hours. - Add the new binaries to your PATH. TUG’s example for a 2026 release on 64-bit Linux is
PATH=/usr/local/texlive/2026/bin/x86_64-linux:$PATH; use the year and platform directory your installation actually created, and put the line in your shell’s startup file, then log in again.
Installer options worth knowing
| Option | Effect (per the TeX Live quick install page) |
|---|---|
--scheme=small |
Smaller installation (the BasicTeX variant of MacTeX is the same scheme, 600+ MB); the default installs everything and needs 7+ GB. |
--no-doc-install --no-src-install |
Leaves out the documentation and source trees to save space. |
--paper=letter |
Sets US Letter as the default paper size; the default is A4. |
--texdir=DIR, --texuserdir=DIR |
Changes the main installation directory or the per-user directories. |
--location URL |
Uses a specific CTAN mirror if the automatic download has problems, in the form install-tl --location https://mirror.example.net/ctan/path/systems/texlive/tlnet. |
-gui, -gui text, --profile=FILE |
Chooses the graphical, plain-text or batch (profile file) interface. Text is the Unix default; the graphical interface is the default on Windows and macOS and needs Tcl/Tk. |
Verify the installation and read the output
The TeX Live documentation gives two checks. First run tex --version: if the command is not found, the PATH entry points at the wrong binary subdirectory. Second, compile the sample document shipped with the distribution:
pdflatex sample2e.tex
A working installation prints a banner beginning “This is pdfTeX”, processes the file, and ends with a line of the form “Output written on sample2e.pdf (3 pages, 142120 bytes)”. The byte count can differ between versions; the important signs are that the run finishes without an error prompt and that sample2e.pdf appears in the current directory. For compiling your own documents and reading the log, see our guide to compiling LaTeX, and for engine choice the entry on LuaLaTeX.
Troubleshooting
The command is not found after installing
The binaries directory is not on your PATH. On Unix add the year and platform directory under /usr/local/texlive as shown above and log in again; on Windows the installer sets the path itself, so reopen the terminal. The TeX Live documentation also notes that leftover environment variables from an older TeX installation can interfere.
The installation failed part-way
TUG’s instruction is to remove the partial installation and per-user files and start again: rm -rf /usr/local/texlive/2026 and rm -rf ~/.texlive2026 (substituting the release you were installing).
Download problems
Point the installer at a specific mirror with --location (see the option table). On Windows, the ISO-based installer is the alternative TUG describes when the network installer is slow.
Windows: “tar: Skipping to next file header”
The Windows TeX Live page documents this error as a conflict with MinGW or Cygwin tools on the path and gives the workaround of setting the environment variable TEXLIVE_PREFER_OWN=1 before running the installer.
Perl is missing on Unix
Except on Windows, the installer needs a standard Perl on the system, so install Perl through your system’s package manager first.
Updating and adding packages
Once installed, TeX Live packages are added, removed and updated with tlmgr, either its graphical interface or its command line.
Free alternatives to a local installation
| Option | What it is | Related guide |
|---|---|---|
| Overleaf | Web-based LaTeX editor that compiles in the browser, so no distribution is installed locally. | What is Overleaf |
| Other web editors | Browser-based LaTeX editing without a local installation. | Online LaTeX editors |
| TeXstudio | A desktop editor; it works with a TeX distribution installed as described above. | TeXstudio guide |
FAQ
What is the installation of LaTeX, in one sentence?
It is the installation of a TeX distribution (TeX Live, MacTeX or MiKTeX) that bundles the compilers and packages, plus optionally an editor.
Which distribution should I install on Windows?
TUG’s TeX Live page recommends its installer for Windows, and MiKTeX is the other distribution with an official Windows installer. Both work; TeX Live also runs on Linux, so it keeps your setup the same across machines.
Which should I install on macOS?
TUG recommends MacTeX; BasicTeX is its smaller version. Both require macOS 11 Big Sur or later.
How much disk space does it need?
The default TeX Live installation installs everything and needs more than 7 GB; the small scheme is a little over 600 MB.
How do I know it worked?
Run pdflatex sample2e.tex and confirm that it ends with “Output written on sample2e.pdf”.
Sources
- TeX Users Group, Installing TeX Live over the Internet, read 2026-11-14.
- TeX Users Group, TeX Live on Windows, read 2026-11-14.
- TeX Users Group, TeX Live documentation, read 2026-11-14.
- TeX Users Group, MacTeX, read 2026-11-14.
- MiKTeX Project, Download MiKTeX, read 2026-11-14.
Data: TeX distributions by operating system: official source and installer scope
Compares the TeX distributions each official project offers for Windows, macOS and Linux, with the installer type and notable constraints, compiled from the TeX Users Group and MiKTeX download pages read on 2026-11-14.
Period covered: 2026.
| Distribution and operating system | Official source | Installer or method | Scope or constraint stated by the source |
|---|---|---|---|
| TeX Live on Windows | tug.org/texlive/windows.html | install-tl-windows.exe or install-tl-iso-windows.exe | 64-bit binaries only from TeX Live 2023; includes own minimal Perl and Tcl/Tk |
| TeX Live on Linux/Unix | tug.org/texlive/quickinstall.html | install-tl-unx.tar.gz, perl ./install-tl | Needs standard Perl; default install is everything (7+ GB) |
| MacTeX on macOS | tug.org/mactex | MacTeX package (full TeX Live plus GUI applications) | Requires macOS 11 Big Sur or higher; Intel and Arm native |
| BasicTeX on macOS | tug.org/mactex | BasicTeX package (small scheme) | Same macOS requirement as MacTeX; supports pdfLaTeX, XeLaTeX, LuaLaTeX |
| MiKTeX on Windows | miktex.org/download | Basic Installer, Net Installer, MiKTeX Setup Utility | 64-bit installers; Basic Installer is minimal, packages can install on demand |
| MiKTeX on macOS | miktex.org/download | Disk image (dmg) | Only a 2022 disk image listed on the download page |
| MiKTeX on Linux | miktex.org/download | Distribution repository plus MiKTeX Console or miktexsetup | Listed for specific Ubuntu, Debian, Fedora, Rocky Linux and openSUSE Leap releases |
Sources
- TeX Live on Windows (TUG) (accessed 2026-11-14)
- Installing TeX Live over the Internet (TUG) (accessed 2026-11-14)
- MacTeX (TUG) (accessed 2026-11-14)
- Download MiKTeX (accessed 2026-11-14)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







