Setting the PATH for TeX Live

Before starting to build TeX Live, set up your PATH so that the system can properly find the files. If you set up your login scripts as recommended in The Bash Shell Startup Files, update the needed paths by creating the script. The programs are always installed in an <ARCH>-linux subdirectory and on 32-bit x86 this is always i386-linux. For x86_64 and i?86 we can generate this as $TEXARCH:



If upgrading from a previous year's version, you should manually edit to ensure that the version for the year you wish to use is the only TeX present (some people need to keep multiple years available to ensure there are no regressions in their documents).

Now, create the script as the root user:

TEXARCH=$(uname -m | sed -e 's/i.86/i386/' -e 's/$/-linux/')

cat > /etc/profile.d/ << EOF
# Begin texlive setup

pathappend \$TEXLIVE_PREFIX/texmf-dist/doc/man  MANPATH
pathappend \$TEXLIVE_PREFIX/texmf-dist/doc/info INFOPATH
pathappend \$TEXLIVE_PREFIX/bin/$TEXARCH


# End texlive setup



The standard MANPATH and INFOPATH path are specified above to ensure they are included. If they are already set in the boot script procedure, the pathappend function will ensure duplicates are removed, so including them here will do no harm.



The backslashes before the dollar signs in the script above are to facilitate a copy/paste operation. The backslashes should not appear in the actual script.

The new paths can be immediately activated by running:

source /etc/profile

You should now proceed either to install-tl-unx for a binary installation of texlive, or to texlive-20230313 to begin installing from source.