I have just installed LaTEX and need to add the path to my $PATH variable so I can use the command. I have tried adding path (/usr/local/texlive/2015/bin/x86_64-linux) to my .bash_profile and when I restart the terminal and echo $PATH, it does not show my addition.The relevant code that I added:PATH=$PATH:$HOME/.local/bin:$HOME/bin:/usr/local/texlive/2015/bin/x86_64-linuxexport PATHI have tried to add path to /etc/profile but without success. Any advice would be greatly appreciated.
echo $PATH does not show added path in .bash_profile or /etc/profile
linux;bash;path
Your code is correct. The location may or may not be correct. .bash_profile is read if your login shell is bash and you log in in text mode (on a text console or over the network). However, if you log in at a graphical prompt, on most systems, .bash_profile is not read, but .profile is. To avoid duplication, I recommend putting all environment variable assignments in .profile and using the following code for .bash_profile to do the right thing for both interactive and non-interactive login shells:. ~/.profilecase $- in *i*) . ~/.bashrc;; esacDon't put environment variable definitions such as PATH in .bashrc. This would only work in programs invoked from terminals, not e.g. if your editor attempts to run LaTeX automatically.Since .profile (or .bash_profile) is only read when you log in, the setting won't take effect until you log out and back in. You can make the setting take effect in a terminal (including programs started from that terminal) by typing (or pasting) the PATH= command there. Some desktop environments and window managers let you modify their environment variables; how to do this depends on the desktop environment.