You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't opened my WSL for a month, it worked properly last time, but when I opened it this time, every basic command cannot be executed:
shadowstep@Shadowstep:~$ echo $SHELL
/bin/bash
shadowstep@Shadowstep:~$ ll
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
shadowstep@Shadowstep:~$ bash
Command 'bash' is available in '/bin/bash'
The command could not be located because '/bin' is not included in the PATH environment variable.
bash: command not found
shadowstep@Shadowstep:~$ /bin/bash
Command 'lesspipe' is available in the following places
* /bin/lesspipe
* /usr/bin/lesspipe
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
lesspipe: command not found
Command 'dircolors' is available in '/usr/bin/dircolors'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
dircolors: command not found
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
shadowstep@Shadowstep:~$ source ~/.profile
Command 'lesspipe' is available in the following places
* /bin/lesspipe
* /usr/bin/lesspipe
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
lesspipe: command not found
Command 'dircolors' is available in '/usr/bin/dircolors'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
dircolors: command not found
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
shadowstep@Shadowstep:~$
if I manually enter: export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:
Then those commands are fixed. However my pre-defined environment variables exist in ~/.bashrc still cannot be executed.
if I execute echo $PATH at the startup, the paths are: /home/shadowstep/bin:/home/shadowstep/.local/bin:/home/shadowstep/UNIX/Package/modeltestng,
which is equivalent to executing source ~/.profile plus the last line of ~/.bashrc, but my .bashrc file has four lines at last:
I haven't opened my WSL for a month, it worked properly last time, but when I opened it this time, every basic command cannot be executed:
if I manually enter:
export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:
Then those commands are fixed. However my pre-defined environment variables exist in ~/.bashrc still cannot be executed.
if I execute
echo $PATH
at the startup, the paths are:/home/shadowstep/bin:/home/shadowstep/.local/bin:/home/shadowstep/UNIX/Package/modeltestng
,which is equivalent to executing
source ~/.profile
plus the last line of ~/.bashrc, but my .bashrc file has four lines at last:WSL just loaded .profile and the last line of .bashrc
Is it a bug? How should I fix it?
The text was updated successfully, but these errors were encountered: