0

I'm using Ubuntu 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.

PATH=/usr/local/texlive/2015/bin/x86_64-linux

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?

Giacomo1968
  • 58,727
Prasanna
  • 4,174

1 Answers1

1

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

What you want is this:

PATH=/usr/local/texlive/2015/bin/x86_64-linux:$PATH

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

DMCoding
  • 233