Underleaf Logo
Underleaf
UniversitiesAccessibilityBlogPricing
Log InTry Free

How to Install LaTeX: Setup Guide for Windows, macOS, and Linux

April 14, 2026

How to Install LaTeX: Setup Guide for Windows, macOS, and Linux

To write LaTeX documents locally, you need a TeX distribution (the compiler and packages) and an editor. This guide covers installation on Windows, macOS, and Linux, plus the online alternative if you want to skip installation entirely.

Option 1: Skip Installation — Use Overleaf

If you don't want to install anything, use Overleaf. It's a free online LaTeX editor that runs entirely in your browser. No installation, no configuration, no package management — just sign up and start writing.

Overleaf is the most popular choice for students and researchers because it handles compilation, package installation, and collaboration automatically. The free tier is sufficient for most individual projects.

Option 2: Local Installation

A local installation gives you offline access, faster compilation for large projects, and full control over packages and configuration. You need two things:

  • A TeX distribution — The LaTeX compiler, packages, and fonts
  • An editor — Where you write your .tex files

Windows

TeX Live (Recommended)

TeX Live is the standard, comprehensive TeX distribution. It includes everything you need:

  • Download the installer from tug.org/texlive
  • Run install-tl-windows.exe
  • Choose "full installation" (about 7 GB) or a custom scheme if disk space is limited
  • Installation takes 30-60 minutes depending on your connection

MiKTeX (Alternative)

MiKTeX is a Windows-focused distribution that installs packages on demand — it starts smaller and downloads packages as you need them:

  • Download from miktex.org/download
  • Run the installer and follow the prompts
  • On first compile, MiKTeX will prompt you to install any missing packages automatically

macOS

MacTeX is the standard distribution for macOS. It's a pre-packaged version of TeX Live with Mac-specific extras:

  • Download from tug.org/mactex
  • The full download is about 5 GB. A smaller "BasicTeX" option (about 100 MB) is available but requires manual package installation
  • Open the .pkg file and follow the installer

Alternatively, install via Homebrew: brew install --cask mactex

Linux

TeX Live is available through your distribution's package manager:

# Ubuntu / Debian sudo apt install texlive-full # Fedora sudo dnf install texlive-scheme-full # Arch Linux sudo pacman -S texlive

The texlive-full package installs everything (about 5 GB). For a smaller installation, use texlive-base and install additional packages as needed with tlmgr install.

Choosing an Editor

Any text editor works for LaTeX, but editors with LaTeX support offer syntax highlighting, one-click compilation, and PDF preview:

EditorPlatformNotes
VS Code + LaTeX WorkshopAllMost popular. Excellent extension with auto-compile, PDF preview, and IntelliSense
TeXstudioAllPurpose-built for LaTeX. Built-in PDF viewer, autocomplete, and structure view
TeXShopmacOSIncluded with MacTeX. Lightweight and reliable
TeXworksAllIncluded with TeX Live. Minimal and straightforward
Vim/Neovim + VimTeXAllFor Vim users. Fast editing with LaTeX-specific motions

Verifying Your Installation

After installing, verify everything works by creating a test file:

% test.tex \documentclass{article} \begin{document} Hello, LaTeX! The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$. \end{document}

Compile it from the command line:

pdflatex test.tex

If you get a test.pdf with formatted text and a rendered equation, your installation is working correctly.

Managing Packages

LaTeX packages add functionality beyond the base distribution. If you get a "File not found" error for a package:

  • TeX Live: Run tlmgr install package-name in your terminal
  • MiKTeX: It will prompt you to install missing packages automatically, or use the MiKTeX Console
  • Overleaf: All packages are pre-installed. No action needed.
Underleaf Logo
Underleaf

Empowering students and researchers with AI-powered tools for academic writing.

Go to appContact us

Company

PricingBlogTutorialsAffiliate Program

Free Tools

Image to LaTeXExcel to LaTeXArXiv to LaTeXTikZ GeneratorThesis GeneratorChrome ExtensionAll Tools

© 2026 Underleaf. All rights reserved.