# What is the main difference between command latex, tex, pdflatex, pdftex … and all the other commands? [duplicate]

I am new to TeX world, and I use pdfLatex very often.

But sometimes pdfLatex do not work. So I begin to wonder what the difference between all these `tex commands`.

Please give me some guiding information about all these command to make me stay away from confusion.

I will appreciate every comment or answer.

Thanks.

-
–  Werner Jul 24 '13 at 17:07
@Werner OK, I will read them later! Thanks! –  eccstartup Jul 24 '13 at 17:08

## marked as duplicate by lockstep, m0nhawk, Jake, Werner, mafpJul 24 '13 at 21:02

Basically, `tex` consumes plain TeX files, not LaTeX ones. And it generates DVI files, not PDFs. `pdftex` consumes TeX but generates PDFs. `latex` consumes LaTeX, but generates DVIs.
I do not know what do you mean by ‘all the others’. The one variation I use is XeTeX, which always generates PDFs; its `xelatex` command command, thus, consumes XeLaTeX files and generates PDFs.
Thanks, but what do you mean by `TeX files`, `LaTeX files`, `XeLaTeX files` ...? I think the have the same file extension `.tex`. Do they have different styles? If so, how can I decide which is which style? –  eccstartup Jul 25 '13 at 0:38