-bash: wsl: command not found

iqworks Information Quality Works 196 Reputation points

I followed these steps from here

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"
"wsl -l -v"

this is the message i got?:
-bash: wsl: command not found

here are the steps i followed from this link :

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 :
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"
"wsl -l -v"

HERE is where I started getting “**

-bash: wsl: command not found


A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,474 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sascha John Hesse 76 Reputation points

    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

0 additional answers

Sort by: Most helpful