bash: wsl: command not found indicates, that you run the wsl command within a linux bash.
That won't work. I wonder, because you stated out, that you're working in a powershell.
I see two ways,
you could try CTRL+D to logout from the bash, and see, if you return to Powershell afterwards or
just run a plain old cmd (WIN+R -> cmd), which allows you to run wsl -l -v as well
-bash: wsl: command not found
I followed these steps from here
https://www.youtube.com/watch?v=NNmxeUQ7XOQ
but at the end of the following steps I wanted to see if my wsl install was version 2 by using this command:
"wsl --list --verbose"
and
"wsl -l -v"
this is the message i got?:
-bash: wsl: command not found
here are the steps i followed from this link :
https://www.youtube.com/watch?v=NNmxeUQ7XOQ
1 – open powershell as admin.
2 - Enable-WindowsOptionalFeatures -Online -FeatureName Microsoft-Windows-SubSystem-Linux
3 -restart machine
4 – dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
5 - dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
6 - restart machine
7 – https://aka.ms/wsl2kernel (this worked for me as his step 7). I downloaded this package and tried to run it: “wsl_update_x64 (3).msi” and I got this :
8 – wsl --set-default-version 2
9 – in the search box of the task bar, type “Microsoft store”.
10 – in the Microsoft store search type “kali linux”.
I typed in a browser search :
https://apps.microsoft.com/store/detail/kali-linux/9PKR34TNCV07?hl=en-us&gl=US
10a – click on “Get in store app”.
11 – click on “open Microsoft store”
12 – on this drop down, click “Open”
13 – it will open this powershell and ask you for a new username and password
13a – I misentered my password, so I had to do it again
14 – to open kali linux as an app, in the search bar start typing “kali” and you will see this kali linux app. Right click to run as administrator.
15 – it will open a powershell with this:
16 – so, we have installed kali linux as an app on windows 10.
17 – Now lets install a GUI for the kali distribution. First update everything by typing the command:
“sudo apt update && sudo apt upgrand -y”. it will ask for your password.
this is what you will see:
18 – Now to install the desktop type:
“ sudo apt install kali-desktop-xfce -y “
19 - that will run for a while. But call up another power shell window and confirm you have wsl version 2 installed. I tried these two commands :
“ "wsl --list --verbose"
and
"wsl -l -v"
HERE is where I started getting “**
-bash: wsl: command not found
**”
-
Sascha John Hesse 76 Reputation points
2022-07-09T18:06:06.33+00:00