I add this to the end of
PATH=/usr/local/texlive/2015/bin/x86_64-linux:$PATH export PATH
but it is never saved. Close the terminal, open it again and the path is without the one to latex. What am I doing wrong?
.profile gets only loaded in login shells.
Also by default, you don't get a login shell for a GUI shell.
Either put it in e.g.,
.bashrc if you're in bash, or log out of your GUI sessions and then log back in.
You can also source it manually (
. "$HOME/.profile") or force a login shell with
I find it helpful to have echo statements in these rc files so that I can know exactly when each gets loaded.
You don't need the
PATH already is an environment variable.