I'm using WSL (Windows Subsystem for Linux) on windows 10, and installed the Amazon AWS cli on it. When I start WSL (
C:\\WINDOWS\\System32\\wsl.exe in PowerShell) and then
aws it works fine. If I try to run it as a one-liner (
C:\\WINDOWS\\System32\\wsl.exe aws) it doesn't find the
aws command. I need it as a one-liner to be able to use it from a VS Code task.
PS C:\Users\pablo.DCA> C:\\WINDOWS\\System32\\wsl.exe aws /bin/bash: aws: command not found PS C:\Users\pablo.DCA> C:\\WINDOWS\\System32\\wsl.exe pablo@DCA-WS01:/mnt/c/Users/pablo.DCA$ aws usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run: aws help aws <command> help aws <command> <subcommand> help aws: error: too few arguments
echo command does work:
PS C:\Users\pablo.DCA> C:\\WINDOWS\\System32\\wsl.exe echo Hi Hi
And so does Python (which I used to install aws):
PS C:\Users\pablo.DCA> C:\\WINDOWS\\System32\\wsl.exe python Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
Why does this happen? And how can I fix it, or what could I try to figure out what is going wrong?