Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ubuntu ships with texlive 2009, which installs the tex binaries into /usr/bin/latex

I've installed the current version of texlive with its installer, which installs its binaries into /usr/local/texlive/2011/bin/i386-linux/. I've added it to my path (along with the man and info pages, using my .bashrc:

export MANPATH
export PATH

But latex, tex, etc still run the old versions; which latex returns /usr/bin/latex. What is the recommended way to get my system to default to the new binaries, man files, etc? (Seems this should be possible without remapping each binary by hand or replacing the old ones?) Many thanks.

share|improve this question
On a side note, environment variables should be set in .profile or .pam_environment. If you set them in .bashrc, they will only apply to commands run from interactive bash shells. – geirha Apr 3 '12 at 11:03
Thanks. I assume the syntax is the same? – cboettig Apr 4 '12 at 21:49
in .profile, yes. .pam_environment is read by the pam-env module, and only accepts KEY=VALUE pairs, thus you can't append to PATH via this file. – geirha Apr 7 '12 at 16:01
up vote 3 down vote accepted

It will look for thing in the order specified in the path, you've added the new path to the end, and that's why your still getting the old one


is what your looking for


here's a example

$ which ls
$ export PATH=/bin:$PATH
$ which ls
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.