title: Installed Dotnet tools give error "Could not execute because the specified command or file was not found." on Ubuntu WSL2
body: <p>I'm working on an api in .net core 5 in wsl2 and I followed all the documentation to install the entity framework core tools.</p>
  <p>when i run</p>
  <pre><code>dotnet tool list -g
  </code></pre>
  <p>it prints</p>
  <pre><code>Package Id      Version      Commands
  --------------------------------------
  dotnet-ef       5.0.7        dotnet-ef
  </code></pre>
  <p>but when i run</p>
  <pre><code>dotnet ef
  </code></pre>
  <p>or any of its child commands, I get this</p>
  <pre><code>Could not execute because the specified command or file was not found.
  Possible reasons for this include:
   * You misspelled a built-in dotnet command.
   * You intended to execute a .NET program, but dotnet-ef does not exist.
   * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
  </code></pre>
  <p>now, i've looked in my path and it looks like when i ran</p>
  <pre><code>dotnet tool install --global dotnet-ef
  </code></pre>
  <p>it installed it under my C drive instead of inside wsl2 which I think might be the problem but I don't understand why running that within ubuntu would install it into my windows directories but this is the line from my path</p>
  <pre><code>/mnt/c/Users/ethan/.dotnet/tools
  </code></pre>
  <p>so i guess my question is, is the issue that it unstalled under my windows directories and if so how do i either force it to install on ububtu or change my path and if not what is happening.</p>