Modify environment variable PATH

The environment variable PATH should reference the directory which contains the MiKTeX executables.

Windows, Linux

The environment variable PATH is usually correctly set when you install MiKTeX on a computer running Windows or Linux.

macOS

MiKTeX executables can be found

  • in ~/bin, if you have installed MiKTeX for your private use
  • or in /usr/local/bin, if you have installed MiKTeX system-wide

Setting PATH for Terminal

Since /usr/local/bin is usually in the PATH for Terminal, it remains the case of a private installation. Run this command to add ~/bin permanently to the Terminal PATH:

echo export 'PATH=~/bin:$PATH'>> ~/.bash_profile

Setting PATH for GUI applications

You can use the command-line utility launchctl to modify PATH for GUI applications. Either

sudo launchctl config user path "$HOME/bin:$PATH"

if you have a private installation, or

sudo launchctl config system path "/usr/local/bin:$PATH"

for a system-wide setup.

TeXShop

The current TeXShop version does not honor PATH when it searches for TeX-related executables. In order to let TeXShop use the MiKTeX executables, you have to set the engine paths as described here.