post

Simplest Way to Install TeX Live on Linux

· 1 分钟阅读 · 123 字

Prerequisites

Install Docker (skipped here).

Installing TeX Live with Docker

Find the official image on Docker Hub: https://hub.docker.com/r/texlive/texlive

Pull the image and start a container:

docker pull texlive/texlive
docker run -it --name latex texlive/texlive:latest /bin/bash

Editing LaTeX in Docker with VS Code

Method 1: Direct container access

Install the Dev Containers extension in VS Code. Click the remote environment button in the bottom left, select “Attach to Running Container”, and open the working directory.

Method 2: SSH access to container

Note: This method starts a new container based on the image.

docker run -d -it -p 36001:22 --name latex texlive/texlive:latest /bin/bash
service ssh start
# Use Ctrl+P+Q to detach and keep running in background

Connect via VS Code Remote SSH on port 36001.