How to install LaTeX Style Files (.sty) on Ubuntu, using TeTeX or Tex Live

One thing that makes LaTeX so powerful is the enourmous amount of extensions available. Some extensions, usually with the .sty filename extension, do not come with an installation tutorial. I consider that they do not come with a tutorial because it is assumed it is an easy task. Another reason for having no installation instructions might be because it is platform dependent (i.e., different installation directories).

The directory for installing LaTeX files, on Ubuntu, depends on the distribution you are using. If you are using TeTeX, it is: /usr/share/texmf-tetex/tex/latex

If you are using TeX Live, it is: /usr/share/texmf-texlive/tex/latex

To install a style file you have to create a directory for it and copy the contents there. Next you have to run the program mktexlsr as root.

This is an example on how to install the prooftree extension, using the TeTeX distribution:
create a directory named prooftree on /usr/share/texmf-tetex/tex/latex
copy the file prooftree.sty and the file prooftree.tex to the directory /usr/share/texmf-tetex/tex/latex/prooftree
run sudo mktexlsr