I'm using Ubunut 14.04 (as a virtual machine). I installed TeX Live system over the internet.
Once the installation of TeX live finished, it said

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

So, I typed the following command in the terminal.


It didn't throw any error or did not ask any questions / confirmation.

When I tried to run clear command on the terminal it said

Command 'clear' is available in '/usr/bin/clear'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
clear: command not found

What have I done wrong? and more importantly how do it fix it?

However if I close the terminal and re open the terminal, everything seems to be normal. Now will TeX live work?

| improve this question | | | | |

You've temporarily redefined where your system looks to find important commands.

What you want is this:


That redefines $PATH as the textlive directory AND what $PATH was before.

Re-open your terminal and the re-assignment will be lost, so everything is back to normal.

To update the $PATH permanently, add the line to ~/.profile (or ~/.bash_profile if you only want it to affect bash.)

See also: https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path and Difference between .bashrc and .bash_profile

| improve this answer | | | | |
  • should I make this as a permanent change to work with TeX live? Because, it seems to work even after restarting the terminal. So I don't understand the Most importantly, add /usr/local/texlive/2015/bin/x86_64-linux to your PATH for current and future sessions. message shown during the installation – Prasanna Feb 10 '16 at 12:10
  • I have edited my answer with information about doing that. – DMCoding Feb 10 '16 at 14:42
  • 2
    @Prasanna Notice the add in Most importantly, ADD /usr/local/te... Add it to the path. Not replace thew old path with a new. – Hennes Feb 10 '16 at 14:45
  • It's an easy mistake to make though! – DMCoding Feb 10 '16 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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