I'm trying to have both MikTex and TexLive working on my Ubuntu Linux. Both the tex distros have been installed through apt-get. I know this is related to settings on the PATH variable. So what I did is:
Find TexLive executables location:
whereis texlive
That gives:
texlive: /usr/local/texlive /usr/share/texlive
so I added the first one to the PATH, by making sure it comes as first:
PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH ; export PATH
Checking the PATH indeed gives:
/usr/local/texlive/2018/bin/x86_64-linux:/home/stefano/mpich-install/bin:/home/stefano/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
However, if I do:
tex --version
Still I get:
MiKTeX-TeX 2.9.6300 (3.14159265) (MiKTeX 2.9.6700) Copyright (C) 1982 by D. E. Knuth; all rights are reserved. TeX is a trademark of the American Mathematical Society. using bzip2 version 1.0.6, 6-Sept-2010 compiled with curl version 7.58.0; using libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3 compiled with expat version 2.2.5; using expat_2.2.5 compiled with liblzma version 50020022; using 50020022 compiled with MiKTeX Application Framework version 2.6636; using 2.6636 compiled with MiKTeX Core version 6.6704; using 6.6704 compiled with MiKTeX Archive Extractor version 1.6300; using 1.6300 compiled with MiKTeX Package Manager version 2.6700; using 2.6700 compiled with openssl version OpenSSL 1.1.0g 2 Nov 2017; using OpenSSL 1.1.0g 2 Nov 2017 compiled with uriparser version 0.8.4 compiled with zlib version 1.2.11; using 1.2.11
And the same goes for pdflatex and xelatex. Notice that:
which pdflatex
Gives:
/home/stefano/bin/pdflatex
Which is actually a symlink as I can see from:
ls -lah | grep pdflatex
Output:
lrwxrwxrwx 1 root root 22 mag 29 14:37 pdflatex -> /usr/bin/miktex-pdftex
What I'm missing?
type -a pdflatex
report?pdflatex --version
reportpdflatex --version
gives exactly the same astex --version
reported above. Yes, I'm using bash shell. The commandtype -a pdflatex
givespdflatex is /home/stefano/bin/pdflatex pdflatex is /usr/bin/pdflatex
.pdflatex
(from terminal or from editor, whatever) either referring to MikTex or TexLive. So simply switch between distros as I need to.