63

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).

muru
  • 207,228
Rob S.
  • 1,651

2 Answers2

69

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.

geirha
  • 47,279
10

Add these default PATH to /etc/profile. It will work for bash and sh. Bash is default in Ubuntu.

PATH=$PATH:<new path you need to add>

echo $SHELL can be used to determine the shell of current user or can be viewed from /etc/passwd file.

Alternatively you can include it in /etc/environment as well. Here you can just add the PATH at the end of PATH statement.

d a i s y
  • 5,551
Jamess
  • 3,143