Ubuntu – How to set PATH variables for all users on a server

environment-variableslatexmanpagesoftware installation

I just finished installing LaTeX for my company's Ubuntu server that we all SSH into to use. At the end of the install it says this:

Add /usr/local/texlive/2010/texmf/doc/man to MANPATH, if not dynamically determined.

Add /usr/local/texlive/2010/texmf/doc/info to INFOPATH.

Most importantly, add /usr/local/texlive/2010/bin/x86_64-linux to your PATH for current and future sessions.

How do I do this so that these variables are set for all users on the system? (And yes, I have sudo permissions).

Best Answer

You add those to /etc/environment.

It likely already has a line for PATH, so you just append :/usr/local/texlive/2010/bin/x86_64-linux to the end of that. Then add two new lines for MANPATH and INFOPATH.

See https://help.ubuntu.com/community/EnvironmentVariables.

After editing /etc/environment, log out and back in, and check that e.g. echo "$MANPATH" outputs the value you added.

Related Question