[Tex/LaTex] texmf, and what is its relation to TeX

texlive

I've just installed texlive on Ubuntu 16.04. In my system and in online resources, I keep seeing references to texmf, but I can't figure out what it is.

• Web search and tex.stackexchage.com search for "What is texmf?" don't turn up a definition
• It appears frequently on the main page of the texlive docs, but without any definition that I can find
• "texmf" doesn't appear anywhere in the Things with 'TeX' in the name page
• "texmf" doesn't appear anywhere on the TeX FAQ page
• It has no man page

What is it and why do I keep seeing it as if I'm supposed to know what it is?

Edit: After poking around a bit, I've found the standard TeX Directory Structure at /usr/share/texlive/ and /usr/share/texmf/ on Ubuntu 16.04. The information given in the accepted answer refers to these if you're on that system and installed TeX via apt-get install texlive-latex-base.

texmf roughly corresponds the name of the top-level directory within a TeX Distribution. texmf stands for TeX and Metafont. Each texmf directory follows the TeX Directory Structure (TDS) scheme.

For example, a TeX Live system is organized in the following way (on Mac/Linux). There is a texmf-local folder, and a folder for each installed year (here 2017).

/usr/local/texlive
2017/
texmf-local/


Within the 2017 folder there are a number of different texmf-... folders:

/usr/local/texlive/2017
texmf-config
texmf-dist
texmf-var


Each of these shares the same organizational structure, (TDS), but they contain different things. texmf-dist contains all of the packages of the distribution. texmf-config contains configuration files, and texmf-var contains various other system wide files (e.g. hyphenation patterns).

If we look at texmf-dist it follows the TDS scheme and contains the following directories:

asymptote   dvips       metapost    source      ttf2pk
bibtex      fonts       mft         tex         web2c
chktex      hbf2gf      omega       tex4ht      xdvi
context     pbibtex     texconfig   xindy
doc         makeindex   psutils     texdoc
dvipdfmx    metafont    scripts     texdoctk


This provides a set of known directories for TeX and related programs to find things. It is designed to be cross-platform, so that all TeX Live systems will in principle have the same layout.

Furthermore, this directory structure is also used in the texmf-local folder (for machine-wide local additions), and also in the user level texmf folder. See e.g.