Desktop installation

The first thing most people type after installing LaTeX is pdflatex --version. What comes back is not “pdfLaTeX” but pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024). The version number being π is not a joke — Knuth decided TeX’s version should converge on π — and pdflatex announces itself as pdfTeX because pdflatex is literally a symlink to pdftex. This page walks the install through on Windows, macOS and Linux, checks what actually landed, and then spends real time on the failure everyone hits: the command not being on your PATH. The current releases are TeX Live 2026 (1 March 2026) and MacTeX-2026.

Two decisions to make before you launch the installer

There are only two: how much to install (the scheme) and where to put it. Everything else the installer asks you. The default scheme-full runs to around 8 GB, the middle scheme-medium to just under 2 GB, and the small scheme-basic to a little over 200 MB. On a thin connection a full install can easily take an hour to download and unpack. Which scheme contains what — and whether to install TeX Live or MiKTeX at all — is compared on the “Distributions” page; here we concentrate on the work that follows the decision.

Installing LaTeX on Windows

Windows is the least troublesome of the three platforms. For TeX Live, download install-tl-windows.exe from tug.org (about 20 MB; the identical install-tl.zip works too) and run it. It is a net installer: once started it pulls the distribution from a CTAN mirror as it goes. The default target is C:\texlive\2026 and the scheme is chosen in the GUI. The part that matters: on Windows the installer sets PATH for you — prepending the new entry if another TeX is already there, appending it otherwise. When it finishes, open a fresh Command Prompt. A window that was already open is still holding the old PATH.

terminal
REM Verify in a NEW Command Prompt after the installer finishes
where pdflatex
pdflatex --version
tlmgr --version

If you go with MiKTeX, get the Basic MiKTeX Installer (.exe) from the Download page at miktex.org and run it. The wizard asks essentially three things: current user only (recommended) or shared for all users, the paper size, and whether to install missing packages automatically (Always / Ask me first / Never). A shared install needs administrator rights and, since auto-fetched packages land in each user’s own tree anyway, “current user only” is the honest choice on a personal machine. Afterwards, launch the MiKTeX Console and check Updates first. For unattended rollout to a lab full of machines, a silent install via miktexsetup is available.

Installing LaTeX on macOS (MacTeX)

The standard on macOS is MacTeX. Download MacTeX.pkg (about 6.4 GB) from tug.org, double-click it, and follow the prompts — it is signed and notarized by Apple, so Gatekeeper will not stop it. TeX itself installs into /usr/local/texlive/2026, and the GUI apps (TeXShop, BibDesk, LaTeXiT, TeX Live Utility) land in /Applications/TeX/. MacTeX-2026 requires macOS 11 (Big Sur) or later and runs natively on Intel and Apple silicon alike; Catalina and earlier are no longer supported.

On PATH, macOS is the most thoughtful of the three. Instead of putting the binary directory (/usr/local/texlive/2026/bin/universal-darwin) on your PATH directly, MacTeX points a fixed symlink, /Library/TeX/texbin, at the active release’s binaries. Followed on this Mac, the chain runs /Library/TeX/texbinDistributions/Programs/texbin → the current year’s bin, and a file dropped into /etc/paths.d adds /Library/TeX/texbin to the default PATH. The result is that a freshly opened Terminal simply works, and next year’s release needs no edit to any configuration file. To use it immediately in a shell that is already open, rebuild PATH with path_helper.

terminal
# Refresh PATH in the current shell, then verify
eval "$(/usr/libexec/path_helper)"
which pdflatex      # -> /Library/TeX/texbin/pdflatex
pdflatex --version

If you do not want the GUI apps and the command line is enough, Homebrew is the fast route. mactex includes the GUI apps; mactex-no-gui is the same full TeX Live without them; basictex is a much smaller minimal build (no GUI, no Ghostscript) that installs into /usr/local/texlive/2026basic. Since most people edit in VS Code or similar anyway, mactex-no-gui is what usually gets picked in practice.

terminal
# Full TeX Live without the GUI apps (the usual Homebrew choice)
brew install --cask mactex-no-gui

# Or the full bundle with GUI apps
# brew install --cask mactex

# Or a small starter install
# brew install --cask basictex

Installing on Linux / Unix

On Linux/Unix the straightforward route is the official install-tl installer. Fetch install-tl-unx.tar.gz, unpack it, and run the bundled Perl script. The default target is /usr/local/texlive/2026, and writing there needs sudo — or, if you would rather not use sudo at all, press D (directories) in the interactive menu and move the target under your home directory, say ~/texlive/2026, and the permission problem disappears. Prefer a graphical installer to the text one? perl ./install-tl -gui launches the Tcl/Tk version, and --no-interaction installs the default configuration without asking anything.

terminal
# Download, unpack and run the official net installer
cd /tmp
curl -LO https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
zcat < install-tl-unx.tar.gz | tar xf -
cd install-tl-*

sudo perl ./install-tl                 # interactive text installer
# sudo perl ./install-tl -gui          # Tcl/Tk installer instead
# sudo perl ./install-tl --scheme scheme-medium --no-interaction

On Unix you set PATH yourself; unlike Windows there is no automatic step. The binary directory is named after your CPU: /usr/local/texlive/2026/bin/x86_64-linux on 64-bit Intel/AMD, or universal-darwin on macOS as on this machine. You do not have to remember the name — the installer prints the exact lines to add just before it exits. It gives you the man and info paths alongside PATH, so copy all three into your shell startup file (~/.zshrc for zsh, ~/.profile or ~/.bashrc for the bash family).

terminal
# Add to ~/.profile or ~/.bashrc; the folder name follows your CPU
export PATH="/usr/local/texlive/2026/bin/x86_64-linux:$PATH"
export MANPATH="/usr/local/texlive/2026/texmf-dist/doc/man:$MANPATH"
export INFOPATH="/usr/local/texlive/2026/texmf-dist/doc/info:$INFOPATH"

# Then reload and check
. ~/.profile
which pdflatex

When installing over the network is not realistic — a thin connection, dozens of lab machines, or no internet at all — you can install from the yearly ISO image. Fetch the roughly 6 GB ISO from a CTAN mirror, mount it, and run the install-tl inside (install-tl-windows.bat on Windows); the whole distribution goes in with no network. One caveat: the ISO’s contents are never updated after release, so once you are installed, remember to point updates back at the online tlnet repository.

terminal
# Offline install from the yearly ISO image (Linux/Unix)
sudo mount -t iso9660 -o ro,loop,noauto texlive.iso /mnt
cd /mnt && sudo perl install-tl

# Afterwards, send updates back to the online repository
tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet

Confirming it landed: which pdflatex and pdflatex --version

Check in three stages, answering which binary runs, which year it is, and which tree it belongs to. which pdflatex (where pdflatex on Windows) reports the executable that will actually run, and pdflatex --version names itself including the release year, as in pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024). But the executable’s location is not enough. The decisive command is kpsewhich -var-value=SELFAUTOPARENT, which returns the root of the TeX tree that binary actually uses — on this Mac, /usr/local/texlive/2024. Where a binary and its tree have drifted apart, this single line exposes it first.

terminal
# 1. which binary runs, 2. which release it is, 3. which tree it uses
which pdflatex
pdflatex --version
kpsewhich -var-value=SELFAUTOPARENT

# On Windows, replace the first line with:
# where pdflatex

Finally, prove once that it can actually typeset. Write a tiny .tex, compile it, and if a PDF appears the install is done. If this step fails, the cause is almost never PATH — look instead at whether you can write to the working directory, or at non-ASCII characters in the file name.

terminal
printf '\\documentclass{article}\\begin{document}Hello, \\LaTeX!\\end{document}' > hello.tex
pdflatex hello.tex
# -> produces hello.pdf

When the latex command is not found, or the wrong year runs

If which or where returns nothing, PATH is not set up. If it returns something but the behaviour is odd, read the path it printed carefully. What people describe as “the LaTeX path does not work” is in practice one of three things. First, the terminal was never reopened — the setting changed, but that shell is still holding the old PATH. Second, PATH still points at an old year’s tree: last year you wrote /usr/local/texlive/2025/bin/... into ~/.zshrc, this year’s release is installed, and that line is still there. If /usr/local/texlive/2025 has since been deleted you get command not found; if it has not, last year’s release keeps running quietly. Third, two TeX installations are fighting over who comes first.

The third is the nastiest: pdflatex from TeX Live, bibtex from an OS package, tlmgr from an old MacTeX. You think you are processing one manuscript; the tools are each looking at a different tree. Rather than typing which over and over, run tlmgr conf once. It searches your PATH and lists the resolved location of pdftex, xetex, luatex, dvips, dvipdfmx, kpsewhich, fmtutil, updmap and tlmgr, and then prints the active configuration files and font map files as well. If even one line points into a different tree from the rest, that is your problem.

terminal
# One command that resolves every core tool at once
tlmgr conf

# Look for a line whose path differs from the others, e.g.
#   pdftex:    /usr/local/texlive/2026/bin/universal-darwin/pdftex
#   bibtex:    /usr/bin/bibtex          <- a different install!

# The manual equivalent, if tlmgr itself is the thing you distrust
which pdflatex
which lualatex
which tlmgr
  • After editing a startup file, open a new terminal or re-source it. A terminal left open still has the old PATH.
  • Before installing on a machine that already has TeX, note what which pdflatex says. Later you will know what changed.
  • A directory appearing twice in PATH is harmless. What hurts is a line pointing at a different tree sitting in front.
  • If you use upstream TeX Live, do not add apt’s texlive-* on top later — you end up with two trees competing for the front of PATH.
  • If you use MiKTeX, keep updates and package additions inside the MiKTeX Console. tlmgr does not manage MiKTeX.