So far, I’ve followed all steps in this tutorial:

https://www.tug.org/texlive/quickinstall.html

And it seems only the last Post-installation step is not yet done correctly. The tutorial advised me to execute this:

```
PATH=/usr/local/texlive/2014/bin/i386-linux:$PATH
```

On my system, I should replace i386 with x68_64, if I am not mistaken by this output:

```
margreet@linux-ivul:~/Desktop/margreet/latexdocs> arch
x86_64
```

Which would make:

```
PATH=/usr/local/texlive/2014/bin/x86_64-linux:$PATH
```

I have executed this command. Now, I should be able to use the latex command anywhere, to typeset a text file (or not?). I have tried to do this with the following file test.tex located at

```
/home/margreet/Desktop/margreet/latexdocs/
```

The file is just a standard tryout latex file, and the content is probably not relevant to my problem. I’ll post it anyway.

```
\documentclass[a4paper,12pt]{article}
\begin{document}
The foundations of the rigorous study of \emph{analysis}
were laid in the nineteenth century, notably by the
mathematicians Cauchy and Weierstrass. Central to the
study of this subject are the formal definitions of
\emph{limits} and \emph{continuity}.
Let $D$ be a subset of $\bf R$ and let
$f \colon D o \mathbf{R}$ be a real-valued function on
$D$. The function $f$ is said to be \emph{continuous} on
$D$ if, for all $\epsilon > 0$ and for all $x \in D$,
there exists some $\delta > 0$ (which may depend on $x$)
such that if $y \in D$ satisfies
\ |y - x| < \delta \]
then
\ |f(y) - f(x)| < \epsilon. \]
One may readily verify that if $f$ and $g$ are continuous
functions on $D$ then the functions $f+g$, $f-g$ and
$f.g$ are continuous. If in addition $g$ is everywhere
non-zero then $f/g$ is continuous.
\end{document}
```

This is the result when I try to typeset the file using either latex or pdflatex:

```
linux-ivul:/home/margreet/Desktop/margreet/latexdocs # latex test.tex
If 'latex' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf latex
linux-ivul:/home/margreet/Desktop/margreet/latexdocs # pdflatex test.tex
If 'pdflatex' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf pdflatex
```

I am however succesful in typesetting the .tex file from the folder where the latex ‘application’ is stored:

```
linux-ivul:/usr/local/texlive/2014/bin/x86_64-linux # ./latex /home/margreet/Desktop/margreet/latexdocs/test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(/home/margreet/Desktop/margreet/latexdocs/test.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size12.clo)) (./test.aux)
[1] (./test.aux) )
Output written on test.dvi (1 page, 1508 bytes).
Transcript written on test.log.
linux-ivul:/usr/local/texlive/2014/bin/x86_64-linux # ./pdflatex /home/margreet/Desktop/margreet/latexdocs/test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(/home/margreet/Desktop/margreet/latexdocs/test.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size12.clo)) (./test.aux)
[1{/usr/local/texlive/2014/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}]
(./test.aux) )</usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/c
m/cmbx12.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm
/cmmi12.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/
cmr12.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cm
sy10.pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmt
i12.pfb>
Output written on test.pdf (1 page, 50737 bytes).
Transcript written on test.log.
```

The output files go in the same folder as latex and pdflatex are where located. I would however like for the output to appear at the folder where the .tex document is stored. In my ideal world, I could type

```
latex test.tex
```

or something similar in the folder containing test.tex, and have the output also appear in the same folder. Any ideas on how to approach this?