How do I set PATH variables for all users on a server?

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.


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.