# [Tex/LaTex] Change from MiKTeX to TeX Live

distributionsmiktextexlivewindows

I'm basically a noob when it comes to dealing with packages and TeX distributions. I currently have both MiKTeX and TeX Live installed with MiKTeX as the default distribution (I think), but I would like to change to TeX Live. The problem is: How exactly do I change this?

I am using Windows, and the editors I use are Texmaker and TeXstudio.

#### Best Answer

When you compile a document foo.tex with, say, pdflatex through Texmaker, what happens “internally” is that in foo.tex’s directory, pdflatex foo.tex (probably with a few options) is called, as if on the command line. But how does Windows know where pdflatex is? Odds are your document is not in the same directory as your *TeX binaries. The answer is the PATH. The PATH is a system variable containing a list of directories in which Windows will search for something executable called pdflatex, starting with the first one, until it found something.

Assuming you have both TeX Live and MiKTeX installed, they would each have a directory in the PATH. You can find out which one is your “default” by typing tex --version in the command line. Whichever one is your “default” comes first in the PATH. To change the default, you need to switch the order of these two directories in the PATH. Whenever you’re meddling with the PATH, be extremely careful! Here are two ways of doing this:

## Manually changing the PATH

Follow Paulo’s great description to your path (probably the admin path) and look for the two TeX entries; mine are C:\texlive\2012\bin\win32 and C:\Program Files\MiKTeX 2.9\miktex\bin\x64. To reverse the order, it might be helpful to copy the entire PATH into a text editor since the miniscule one-line text field in the Windows dialog is just uncomfortable to deal with. Then, simply switch the order of the two directories by copy-pasting, copy the entire PATH back into the Windows dialog and click “OK”. In my experience, you have to restart your editor (or the command line) in order for the changes to take effect. Calling tex --version again should confirm your change.

## Changing the PATH with Path Editor

If you want to switch distributions more than once, the manual way might be a little tedious. A Super User Question showed me Path Editor (free and not affiliated with me), which gives you a graphic user interface:

Simply change the order of the two entries with “Up” or “Down”, click “Save”, and you’re all set (after the editor restart).