Closed hillerliao closed 4 years ago
That's mean your ~/.local/bin
is not included in your $PATH
. Run echo $PATH
to verify.
Easy fix, add this in your .bashrc
to check if $HOME/.local/bin
directory exists but not available in your $PATH
, then add it to $PATH
.
[[ -d $HOME/.local/bin && -z "${PATH##*$HOME/.local/bin*}" ]] || PATH=$PATH:$HOME/.local/bin
I've also had experience that for some reason /sbin
, /usr/sbin
& /usr/local/sbin
are not available in my $PATH
for sbin_dir in {/sbin,/usr/sbin,/usr/local/sbin}; do
[[ -d $sbin_dir && -z "${PATH##*$sbin_dir*}" ]] || PATH=$PATH:$sbin_dir
done
unset sbin_dir
And I am not sure if this issue have any correlation with any terminal emulator including wsl-terminal.
command in
~/.local/bin
can not be activated.for example ,
/home/{whoami}/.local/bin/jupyter
exists , but when I ranjupyter notebook
, I was toldjupyter: command not found
when I ran the same command in bash.exe windows, everything was OK.
Are you running wsl-terminal with login shell or not? By default $HOME/bin:$HOME/.local/bin
is added to $PATH in .profile and this is done only if you start the shell with -l (you can also use open-wsl-login shortcut which is created with 4-create-start-menu-shortcut-login-shell.js)
@hillerliao, any feedback on this?
sorry I delete the wsl .
command in
~/.local/bin
can not be activated.for example ,
/home/{whoami}/.local/bin/jupyter
exists , but when I ranjupyter notebook
, I was toldjupyter: command not found
when I ran the same command in bash.exe windows, everything was OK.