# How can latex and pdflatex be both symbolic links to same executable (pdftex) and not behave the same?

When I run

$latex my_doc.tex and$ pdflatex my_doc.tex

it works, and when I run

$pdftex my_doc.tex it doesn't work. The thing is I noticed that both LaTeX and pdflatex commands are symbolic links to the same pdftex executable. That is,$ which latex pdflatex pdftex

yields

/usr/bin/latex
/usr/bin/pdflatex
/usr/bin/pdftex

and

\$ ls -l /usr/bin/latex /usr/bin/pdflatex /usr/bin/pdftex

yields

/usr/bin/latex -> pdftex
/usr/bin/pdflatex -> pdftex
/usr/bin/pdftex

So how is it possible that commands being symbolic links to a same executable do not behave in the same way ?

Thanks.

I have Ubuntu 12.10 with TeXLive-full 2012.20120611-4 installed.

-
pdftex is a pdf variant of "plain TeX", that's why you get errors compiling your document with it. –  karlkoeller Jul 17 '13 at 15:18
BTW: Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  karlkoeller Jul 17 '13 at 15:19
My question is, perhaps, more a 'linux command' thing than a 'TeX engine/format' thing (I don't know). That is, how is it possible that LaTeX knows when I type latex or pdftex at the command prompt, while both commands point at the same executable? –  Martin G. Jul 17 '13 at 15:30
Thanks karlkoeller for the welcome ! I will have a look at the starter guide shortly. –  Martin G. Jul 17 '13 at 15:33