A couple of weeks ago I could run jupyter notebook without problems, but today I got the usual jupyter: command not found. I was getting crazy until I realized that the problem was that $HOME/.local/bin was not in variable PATH. In these last weeks I didn't modify explicitely the ~/.bashrc or the ~/.profile files, or the PATH variable. In fact, when I modify it, is by means of export PATH=new_path:$PATH Therefore, I believe that $HOME/.local/bin was in the variable PATH a couple of weeks ago, when I could run jupyter, but some command or Debian/Linux behaviour removed it.
What I did these last weeks is just install new packages by means of apt-get, the usual apt-get upgrade. I also updated rust by means of rustup update. I suspected this might casue the issue because the most new address in PATH by the left was $HOME/cargo/bin.
But now I see that:
- If I run source ~/.profile, $HOME/.local/bin is attached to PATH, since a part of the .profile file is
Code: Select all
if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi
- When I exit the terminal and I open again, the PATH variable is again the default, not including $HOME/.local/bin
- Why happens this and what can I do so that I do not have to run source ~/.profile each time I open the terminal? (let me add that I do have neither a .bash_profile file nor a .bash_login file as would avoid the use of .profile by
https://wiki.debian.org/EnvironmentVariables)bash first reads /etc/profile to get values that are defined for all users. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first of these files that exists and is readable.
- Could some other Debian behaviour return the PATH variable to its default?
- Is there some log file where I can see changes in PATH variable? (I would like to know what was the variable some weeks ago, when jupyter notebook worked without problems.)