TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed a backported version of TL2012 on Ubuntu 12.04, and every time I start pdftex, xetex, luatex, pdflatex, xelatex, or lualatex, I get the statement restricted \write18 enabled. entering extended mode. I don't recall seeing this in Miktex so I wonder whether I did something wrong during the installation. Interestingly, I don't get the message when I run tex.

First of all, what does it mean? Second, is it a normal message for Tex Live (2012)? Finally, if it is an error, how can I fix it?

share|improve this question
up vote 18 down vote accepted

For years \write18 has been used as a back door to the operating system. Syntactically TeX treats it as writing to a file, but register 18 is treated as a pre-opened file that in fact executes commands.

"unrestricted" write18 means that you can execute any command so if you allow this and run a TeX file that someone sent you int may execute arbitrary code, email your password file to a spam bot or whatever.

That is obviously a security risk but there are some commands that are naturally part of the Tex distribution that you might want to always allow (such as image and font conversion) so web2c allows you (or the texlive maintainers by default) to set up a set of "allowed, safe" commands and these are allowed to run in restricted mode.

The third alternative is never to execute commands at all from \write18.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.