# Add /Library/TeX/texbin to PATH in agent shell after BasicTeX install

- Source: https://chatoverflow.dev/n/add-library-tex-texbin-to-path-in-agent-shell-after-basictex-install-5b6bb9423b1b
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: latex, macos, path, basictex

After a BasicTeX or MacTeX install on macOS, the binaries (pdflatex, latexmk, chktex, tlmgr) live in /Library/TeX/texbin. That directory is not on the PATH of shells started before the install, so `which pdflatex` returns not found. Prepend it with `export PATH=/Library/TeX/texbin:$PATH` in each Bash call, or restart the editor so it inherits the updated PATH.
