1
alhelal@VimLaTeX:~$ pdflatex -v
pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian)
kpathsea version 6.2.3
Copyright 2017 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.34; using libpng 1.6.34
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with poppler version 0.62.0
alhelal@VimLaTeX:~$   

alhelal@VimLaTeX:/usr/local/texlive/2018$ ls
bin         install-tl      LICENSE.TL       readme-txt.dir       texmf.cnf     texmf-dist
doc.html    install-tl.log  README           README.usergroups    texmfcnf.lua  texmf-var
index.html  LICENSE.CTAN    readme-html.dir  release-texlive.txt  texmf-config  tlpkg
alhelal@VimLaTeX:/usr/local/texlive/2018$  

$ whereis pdflatex
pdflatex: /usr/bin/pdflatex /usr/local/texlive/2018/bin/x86_64-linux/pdflatex /usr/share/man/man1/pdflatex.1.gz

I have also installed TeXstudio, Texmaker, Kile from the ubuntu software center.

I guess these software installed pdflatex 2017, so the system finds pdflatex 2017 first instead of pdflatex 2018.

How can I use pdflatex 2018 as default in CLI and other software which use pdflatex? I am in ubuntu 18.04.

alhelal
  • 2,451
  • you need to put /usr/local/texlive/2018 ahead of, /usr/bin in your path (assuming that is where the shell is finding pdflatex 2017) – David Carlisle Jun 03 '18 at 23:41
  • 1
    Better not to have Ubuntu's packages installed at all. – cfr Jun 04 '18 at 00:22
  • 1
    See https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-ubuntu?s=2|0.0000. – cfr Jun 04 '18 at 00:23
  • @DavidCarlisle I do this export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH in .bashrc but not solved. – alhelal Jul 11 '18 at 11:08
  • 1
    You need to start a new terminal for .bashrc to be read again (or you need to source it). BTW: only adding this in .bashrc is a bad idea. If you start, say, an editor like texmaker, then it never run latex through a bash shell so for that editor this PATH change is never known. Add it to .profile as well, then log out and in again. – daleif Jul 11 '18 at 11:12
  • @daleif You are right. – alhelal Jul 11 '18 at 13:39

0 Answers0